diff --git a/codegen/Automation/Actions/Api/DefinitionsApi.php b/codegen/Automation/Actions/Api/DefinitionsApi.php index 59d61423..901ab6c3 100644 --- a/codegen/Automation/Actions/Api/DefinitionsApi.php +++ b/codegen/Automation/Actions/Api/DefinitionsApi.php @@ -76,19 +76,19 @@ class DefinitionsApi 'archive' => [ 'application/json', ], - 'automationV4ActionsAppIdDefinitionIdRequiresObject' => [ + 'create' => [ 'application/json', ], - 'automationV4ActionsAppIdDefinitionIdRequiresObject_0' => [ + 'getById' => [ 'application/json', ], - 'create' => [ + 'getObjectRequirement' => [ 'application/json', ], - 'getById' => [ + 'getPage' => [ 'application/json', ], - 'getPage' => [ + 'setObjectRequirement' => [ 'application/json', ], 'update' => [ @@ -147,17 +147,17 @@ public function getConfig() * * Delete an action definition * - * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $definition_id The ID of the action definition to delete. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function archive($app_id, $definition_id, string $contentType = self::contentTypes['archive'][0]) + public function archive($definition_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - $this->archiveWithHttpInfo($app_id, $definition_id, $contentType); + $this->archiveWithHttpInfo($definition_id, $app_id, $contentType); } /** @@ -165,17 +165,17 @@ public function archive($app_id, $definition_id, string $contentType = self::con * * Delete an action definition * - * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $definition_id The ID of the action definition to delete. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveWithHttpInfo($app_id, $definition_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveWithHttpInfo($definition_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - $request = $this->archiveRequest($app_id, $definition_id, $contentType); + $request = $this->archiveRequest($definition_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -223,16 +223,16 @@ public function archiveWithHttpInfo($app_id, $definition_id, string $contentType * * Delete an action definition * - * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $definition_id The ID of the action definition to delete. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsync($app_id, $definition_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsync($definition_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - return $this->archiveAsyncWithHttpInfo($app_id, $definition_id, $contentType) + return $this->archiveAsyncWithHttpInfo($definition_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -245,17 +245,17 @@ function ($response) { * * Delete an action definition * - * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $definition_id The ID of the action definition to delete. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsyncWithHttpInfo($app_id, $definition_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsyncWithHttpInfo($definition_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { $returnType = ''; - $request = $this->archiveRequest($app_id, $definition_id, $contentType); + $request = $this->archiveRequest($definition_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -283,27 +283,27 @@ function ($exception) { /** * Create request for operation 'archive' * - * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $definition_id The ID of the action definition to delete. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveRequest($app_id, $definition_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveRequest($definition_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'definition_id' is set + if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling archive' + 'Missing the required parameter $definition_id when calling archive' ); } - // verify the required parameter 'definition_id' is set - if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $definition_id when calling archive' + 'Missing the required parameter $app_id when calling archive' ); } @@ -318,18 +318,18 @@ public function archiveRequest($app_id, $definition_id, string $contentType = se // path params - if ($app_id !== null) { + if ($definition_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'definitionId' . '}', + ObjectSerializer::toPathValue($definition_id), $resourcePath ); } // path params - if ($definition_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'definitionId' . '}', - ObjectSerializer::toPathValue($definition_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -394,40 +394,40 @@ public function archiveRequest($app_id, $definition_id, string $contentType = se } /** - * Operation automationV4ActionsAppIdDefinitionIdRequiresObject + * Operation create * - * Retrieve the object requirement status for a custom action definition. + * Create a new custom action definition * - * @param int $app_id The ID of the app associated with the custom action definition. (required) - * @param string $definition_id The ID of the custom action definition. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject'] to see the possible values for this operation + * @param int $app_id The unique identifier for the app. (required) + * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg public_action_definition_egg (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse|\HubSpot\Client\Automation\Actions\Model\Error + * @return \HubSpot\Client\Automation\Actions\Model\PublicActionDefinition|\HubSpot\Client\Automation\Actions\Model\Error */ - public function automationV4ActionsAppIdDefinitionIdRequiresObject($app_id, $definition_id, string $contentType = self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject'][0]) + public function create($app_id, $public_action_definition_egg, string $contentType = self::contentTypes['create'][0]) { - list($response) = $this->automationV4ActionsAppIdDefinitionIdRequiresObjectWithHttpInfo($app_id, $definition_id, $contentType); + list($response) = $this->createWithHttpInfo($app_id, $public_action_definition_egg, $contentType); return $response; } /** - * Operation automationV4ActionsAppIdDefinitionIdRequiresObjectWithHttpInfo + * Operation createWithHttpInfo * - * Retrieve the object requirement status for a custom action definition. + * Create a new custom action definition * - * @param int $app_id The ID of the app associated with the custom action definition. (required) - * @param string $definition_id The ID of the custom action definition. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject'] to see the possible values for this operation + * @param int $app_id The unique identifier for the app. (required) + * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionDefinition|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function automationV4ActionsAppIdDefinitionIdRequiresObjectWithHttpInfo($app_id, $definition_id, string $contentType = self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject'][0]) + public function createWithHttpInfo($app_id, $public_action_definition_egg, string $contentType = self::contentTypes['create'][0]) { - $request = $this->automationV4ActionsAppIdDefinitionIdRequiresObjectRequest($app_id, $definition_id, $contentType); + $request = $this->createRequest($app_id, $public_action_definition_egg, $contentType); try { $options = $this->createHttpClientOption(); @@ -453,9 +453,9 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObjectWithHttpInfo($ switch($statusCode) { - case 200: + case 201: return $this->handleResponseWithDataType( - '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse', + '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', $request, $response, ); @@ -483,16 +483,16 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObjectWithHttpInfo($ } return $this->handleResponseWithDataType( - '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse', + '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse', + '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -513,20 +513,20 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObjectWithHttpInfo($ } /** - * Operation automationV4ActionsAppIdDefinitionIdRequiresObjectAsync + * Operation createAsync * - * Retrieve the object requirement status for a custom action definition. + * Create a new custom action definition * - * @param int $app_id The ID of the app associated with the custom action definition. (required) - * @param string $definition_id The ID of the custom action definition. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject'] to see the possible values for this operation + * @param int $app_id The unique identifier for the app. (required) + * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function automationV4ActionsAppIdDefinitionIdRequiresObjectAsync($app_id, $definition_id, string $contentType = self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject'][0]) + public function createAsync($app_id, $public_action_definition_egg, string $contentType = self::contentTypes['create'][0]) { - return $this->automationV4ActionsAppIdDefinitionIdRequiresObjectAsyncWithHttpInfo($app_id, $definition_id, $contentType) + return $this->createAsyncWithHttpInfo($app_id, $public_action_definition_egg, $contentType) ->then( function ($response) { return $response[0]; @@ -535,21 +535,21 @@ function ($response) { } /** - * Operation automationV4ActionsAppIdDefinitionIdRequiresObjectAsyncWithHttpInfo + * Operation createAsyncWithHttpInfo * - * Retrieve the object requirement status for a custom action definition. + * Create a new custom action definition * - * @param int $app_id The ID of the app associated with the custom action definition. (required) - * @param string $definition_id The ID of the custom action definition. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject'] to see the possible values for this operation + * @param int $app_id The unique identifier for the app. (required) + * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function automationV4ActionsAppIdDefinitionIdRequiresObjectAsyncWithHttpInfo($app_id, $definition_id, string $contentType = self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject'][0]) + public function createAsyncWithHttpInfo($app_id, $public_action_definition_egg, string $contentType = self::contentTypes['create'][0]) { - $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse'; - $request = $this->automationV4ActionsAppIdDefinitionIdRequiresObjectRequest($app_id, $definition_id, $contentType); + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition'; + $request = $this->createRequest($app_id, $public_action_definition_egg, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -588,34 +588,34 @@ function ($exception) { } /** - * Create request for operation 'automationV4ActionsAppIdDefinitionIdRequiresObject' + * Create request for operation 'create' * - * @param int $app_id The ID of the app associated with the custom action definition. (required) - * @param string $definition_id The ID of the custom action definition. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject'] to see the possible values for this operation + * @param int $app_id The unique identifier for the app. (required) + * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function automationV4ActionsAppIdDefinitionIdRequiresObjectRequest($app_id, $definition_id, string $contentType = self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject'][0]) + public function createRequest($app_id, $public_action_definition_egg, string $contentType = self::contentTypes['create'][0]) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling automationV4ActionsAppIdDefinitionIdRequiresObject' + 'Missing the required parameter $app_id when calling create' ); } - // verify the required parameter 'definition_id' is set - if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { + // verify the required parameter 'public_action_definition_egg' is set + if ($public_action_definition_egg === null || (is_array($public_action_definition_egg) && count($public_action_definition_egg) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $definition_id when calling automationV4ActionsAppIdDefinitionIdRequiresObject' + 'Missing the required parameter $public_action_definition_egg when calling create' ); } - $resourcePath = '/automation/v4/actions/{appId}/{definitionId}/requires-object'; + $resourcePath = '/automation/v4/actions/{appId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -632,14 +632,6 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObjectRequest($app_i $resourcePath ); } - // path params - if ($definition_id !== null) { - $resourcePath = str_replace( - '{' . 'definitionId' . '}', - ObjectSerializer::toPathValue($definition_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -649,7 +641,14 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObjectRequest($app_i ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($public_action_definition_egg)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($public_action_definition_egg), JSON_THROW_ON_ERROR); + } else { + $httpBody = $public_action_definition_egg; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -693,7 +692,7 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObjectRequest($app_i $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -701,41 +700,42 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObjectRequest($app_i } /** - * Operation automationV4ActionsAppIdDefinitionIdRequiresObject_0 + * Operation getById * - * Set the object requirement for a custom action definition. + * Retrieve a custom action definition * - * @param int $app_id The ID of the app associated with the custom action definition. (required) - * @param string $definition_id The ID of the custom action definition. (required) - * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectRequest $public_action_definition_requires_object_request public_action_definition_requires_object_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject_0'] to see the possible values for this operation + * @param string $definition_id The ID of the action definition to retrieve. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return void + * @return \HubSpot\Client\Automation\Actions\Model\PublicActionDefinition|\HubSpot\Client\Automation\Actions\Model\Error */ - public function automationV4ActionsAppIdDefinitionIdRequiresObject_0($app_id, $definition_id, $public_action_definition_requires_object_request, string $contentType = self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject_0'][0]) + public function getById($definition_id, $app_id, $archived = false, string $contentType = self::contentTypes['getById'][0]) { - $this->automationV4ActionsAppIdDefinitionIdRequiresObject_0WithHttpInfo($app_id, $definition_id, $public_action_definition_requires_object_request, $contentType); + list($response) = $this->getByIdWithHttpInfo($definition_id, $app_id, $archived, $contentType); + return $response; } /** - * Operation automationV4ActionsAppIdDefinitionIdRequiresObject_0WithHttpInfo + * Operation getByIdWithHttpInfo * - * Set the object requirement for a custom action definition. + * Retrieve a custom action definition * - * @param int $app_id The ID of the app associated with the custom action definition. (required) - * @param string $definition_id The ID of the custom action definition. (required) - * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectRequest $public_action_definition_requires_object_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject_0'] to see the possible values for this operation + * @param string $definition_id The ID of the action definition to retrieve. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionDefinition|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function automationV4ActionsAppIdDefinitionIdRequiresObject_0WithHttpInfo($app_id, $definition_id, $public_action_definition_requires_object_request, string $contentType = self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject_0'][0]) + public function getByIdWithHttpInfo($definition_id, $app_id, $archived = false, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->automationV4ActionsAppIdDefinitionIdRequiresObject_0Request($app_id, $definition_id, $public_action_definition_requires_object_request, $contentType); + $request = $this->getByIdRequest($definition_id, $app_id, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -760,9 +760,51 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObject_0WithHttpInfo $statusCode = $response->getStatusCode(); - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Automation\Actions\Model\Error', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -779,21 +821,21 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObject_0WithHttpInfo } /** - * Operation automationV4ActionsAppIdDefinitionIdRequiresObject_0Async + * Operation getByIdAsync * - * Set the object requirement for a custom action definition. + * Retrieve a custom action definition * - * @param int $app_id The ID of the app associated with the custom action definition. (required) - * @param string $definition_id The ID of the custom action definition. (required) - * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectRequest $public_action_definition_requires_object_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject_0'] to see the possible values for this operation + * @param string $definition_id The ID of the action definition to retrieve. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function automationV4ActionsAppIdDefinitionIdRequiresObject_0Async($app_id, $definition_id, $public_action_definition_requires_object_request, string $contentType = self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject_0'][0]) + public function getByIdAsync($definition_id, $app_id, $archived = false, string $contentType = self::contentTypes['getById'][0]) { - return $this->automationV4ActionsAppIdDefinitionIdRequiresObject_0AsyncWithHttpInfo($app_id, $definition_id, $public_action_definition_requires_object_request, $contentType) + return $this->getByIdAsyncWithHttpInfo($definition_id, $app_id, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -802,28 +844,41 @@ function ($response) { } /** - * Operation automationV4ActionsAppIdDefinitionIdRequiresObject_0AsyncWithHttpInfo + * Operation getByIdAsyncWithHttpInfo * - * Set the object requirement for a custom action definition. + * Retrieve a custom action definition * - * @param int $app_id The ID of the app associated with the custom action definition. (required) - * @param string $definition_id The ID of the custom action definition. (required) - * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectRequest $public_action_definition_requires_object_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject_0'] to see the possible values for this operation + * @param string $definition_id The ID of the action definition to retrieve. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function automationV4ActionsAppIdDefinitionIdRequiresObject_0AsyncWithHttpInfo($app_id, $definition_id, $public_action_definition_requires_object_request, string $contentType = self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject_0'][0]) + public function getByIdAsyncWithHttpInfo($definition_id, $app_id, $archived = false, string $contentType = self::contentTypes['getById'][0]) { - $returnType = ''; - $request = $this->automationV4ActionsAppIdDefinitionIdRequiresObject_0Request($app_id, $definition_id, $public_action_definition_requires_object_request, $contentType); + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition'; + $request = $this->getByIdRequest($definition_id, $app_id, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -843,83 +898,79 @@ function ($exception) { } /** - * Create request for operation 'automationV4ActionsAppIdDefinitionIdRequiresObject_0' + * Create request for operation 'getById' * - * @param int $app_id The ID of the app associated with the custom action definition. (required) - * @param string $definition_id The ID of the custom action definition. (required) - * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectRequest $public_action_definition_requires_object_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject_0'] to see the possible values for this operation + * @param string $definition_id The ID of the action definition to retrieve. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function automationV4ActionsAppIdDefinitionIdRequiresObject_0Request($app_id, $definition_id, $public_action_definition_requires_object_request, string $contentType = self::contentTypes['automationV4ActionsAppIdDefinitionIdRequiresObject_0'][0]) + public function getByIdRequest($definition_id, $app_id, $archived = false, string $contentType = self::contentTypes['getById'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling automationV4ActionsAppIdDefinitionIdRequiresObject_0' - ); - } - // verify the required parameter 'definition_id' is set if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $definition_id when calling automationV4ActionsAppIdDefinitionIdRequiresObject_0' + 'Missing the required parameter $definition_id when calling getById' ); } - // verify the required parameter 'public_action_definition_requires_object_request' is set - if ($public_action_definition_requires_object_request === null || (is_array($public_action_definition_requires_object_request) && count($public_action_definition_requires_object_request) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $public_action_definition_requires_object_request when calling automationV4ActionsAppIdDefinitionIdRequiresObject_0' + 'Missing the required parameter $app_id when calling getById' ); } - $resourcePath = '/automation/v4/actions/{appId}/{definitionId}/requires-object'; + + $resourcePath = '/automation/v4/actions/{appId}/{definitionId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params - if ($app_id !== null) { + if ($definition_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'definitionId' . '}', + ObjectSerializer::toPathValue($definition_id), $resourcePath ); } // path params - if ($definition_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'definitionId' . '}', - ObjectSerializer::toPathValue($definition_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( - ['*/*', ], + ['application/json', '*/*', ], $contentType, $multipart ); // for model (json/xml) - if (isset($public_action_definition_requires_object_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($public_action_definition_requires_object_request), JSON_THROW_ON_ERROR); - } else { - $httpBody = $public_action_definition_requires_object_request; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -963,7 +1014,7 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObject_0Request($app $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -971,40 +1022,40 @@ public function automationV4ActionsAppIdDefinitionIdRequiresObject_0Request($app } /** - * Operation create + * Operation getObjectRequirement * - * Create a new custom action definition + * Retrieve the object requirement status for a custom action definition. * - * @param int $app_id The unique identifier for the app. (required) - * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg public_action_definition_egg (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation + * @param int $app_id The ID of the app associated with the custom action definition. (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getObjectRequirement'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Automation\Actions\Model\PublicActionDefinition|\HubSpot\Client\Automation\Actions\Model\Error + * @return \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse|\HubSpot\Client\Automation\Actions\Model\Error */ - public function create($app_id, $public_action_definition_egg, string $contentType = self::contentTypes['create'][0]) + public function getObjectRequirement($app_id, $definition_id, string $contentType = self::contentTypes['getObjectRequirement'][0]) { - list($response) = $this->createWithHttpInfo($app_id, $public_action_definition_egg, $contentType); + list($response) = $this->getObjectRequirementWithHttpInfo($app_id, $definition_id, $contentType); return $response; } /** - * Operation createWithHttpInfo + * Operation getObjectRequirementWithHttpInfo * - * Create a new custom action definition + * Retrieve the object requirement status for a custom action definition. * - * @param int $app_id The unique identifier for the app. (required) - * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation + * @param int $app_id The ID of the app associated with the custom action definition. (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getObjectRequirement'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionDefinition|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function createWithHttpInfo($app_id, $public_action_definition_egg, string $contentType = self::contentTypes['create'][0]) + public function getObjectRequirementWithHttpInfo($app_id, $definition_id, string $contentType = self::contentTypes['getObjectRequirement'][0]) { - $request = $this->createRequest($app_id, $public_action_definition_egg, $contentType); + $request = $this->getObjectRequirementRequest($app_id, $definition_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1030,9 +1081,9 @@ public function createWithHttpInfo($app_id, $public_action_definition_egg, strin switch($statusCode) { - case 201: + case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', + '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse', $request, $response, ); @@ -1060,16 +1111,16 @@ public function createWithHttpInfo($app_id, $public_action_definition_egg, strin } return $this->handleResponseWithDataType( - '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', + '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', + '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1090,20 +1141,20 @@ public function createWithHttpInfo($app_id, $public_action_definition_egg, strin } /** - * Operation createAsync + * Operation getObjectRequirementAsync * - * Create a new custom action definition + * Retrieve the object requirement status for a custom action definition. * - * @param int $app_id The unique identifier for the app. (required) - * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation + * @param int $app_id The ID of the app associated with the custom action definition. (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getObjectRequirement'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAsync($app_id, $public_action_definition_egg, string $contentType = self::contentTypes['create'][0]) + public function getObjectRequirementAsync($app_id, $definition_id, string $contentType = self::contentTypes['getObjectRequirement'][0]) { - return $this->createAsyncWithHttpInfo($app_id, $public_action_definition_egg, $contentType) + return $this->getObjectRequirementAsyncWithHttpInfo($app_id, $definition_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1112,21 +1163,21 @@ function ($response) { } /** - * Operation createAsyncWithHttpInfo + * Operation getObjectRequirementAsyncWithHttpInfo * - * Create a new custom action definition + * Retrieve the object requirement status for a custom action definition. * - * @param int $app_id The unique identifier for the app. (required) - * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation + * @param int $app_id The ID of the app associated with the custom action definition. (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getObjectRequirement'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createAsyncWithHttpInfo($app_id, $public_action_definition_egg, string $contentType = self::contentTypes['create'][0]) + public function getObjectRequirementAsyncWithHttpInfo($app_id, $definition_id, string $contentType = self::contentTypes['getObjectRequirement'][0]) { - $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition'; - $request = $this->createRequest($app_id, $public_action_definition_egg, $contentType); + $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectResponse'; + $request = $this->getObjectRequirementRequest($app_id, $definition_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1165,34 +1216,34 @@ function ($exception) { } /** - * Create request for operation 'create' + * Create request for operation 'getObjectRequirement' * - * @param int $app_id The unique identifier for the app. (required) - * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionEgg $public_action_definition_egg (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation + * @param int $app_id The ID of the app associated with the custom action definition. (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getObjectRequirement'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createRequest($app_id, $public_action_definition_egg, string $contentType = self::contentTypes['create'][0]) + public function getObjectRequirementRequest($app_id, $definition_id, string $contentType = self::contentTypes['getObjectRequirement'][0]) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling create' + 'Missing the required parameter $app_id when calling getObjectRequirement' ); } - // verify the required parameter 'public_action_definition_egg' is set - if ($public_action_definition_egg === null || (is_array($public_action_definition_egg) && count($public_action_definition_egg) === 0)) { + // verify the required parameter 'definition_id' is set + if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $public_action_definition_egg when calling create' + 'Missing the required parameter $definition_id when calling getObjectRequirement' ); } - $resourcePath = '/automation/v4/actions/{appId}'; + $resourcePath = '/automation/v4/actions/{appId}/{definitionId}/requires-object'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1209,6 +1260,14 @@ public function createRequest($app_id, $public_action_definition_egg, string $co $resourcePath ); } + // path params + if ($definition_id !== null) { + $resourcePath = str_replace( + '{' . 'definitionId' . '}', + ObjectSerializer::toPathValue($definition_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -1218,14 +1277,7 @@ public function createRequest($app_id, $public_action_definition_egg, string $co ); // for model (json/xml) - if (isset($public_action_definition_egg)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($public_action_definition_egg), JSON_THROW_ON_ERROR); - } else { - $httpBody = $public_action_definition_egg; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1269,7 +1321,7 @@ public function createRequest($app_id, $public_action_definition_egg, string $co $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1277,42 +1329,44 @@ public function createRequest($app_id, $public_action_definition_egg, string $co } /** - * Operation getById + * Operation getPage * - * Retrieve a custom action definition + * Retrieve custom action definitions * - * @param int $app_id The ID of the app associated with the action definition. (required) - * @param string $definition_id The ID of the action definition to retrieve. (required) + * @param int $app_id The unique identifier for the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Automation\Actions\Model\PublicActionDefinition|\HubSpot\Client\Automation\Actions\Model\Error + * @return \HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging|\HubSpot\Client\Automation\Actions\Model\Error */ - public function getById($app_id, $definition_id, $archived = false, string $contentType = self::contentTypes['getById'][0]) + public function getPage($app_id, $limit = null, $after = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getByIdWithHttpInfo($app_id, $definition_id, $archived, $contentType); + list($response) = $this->getPageWithHttpInfo($app_id, $limit, $after, $archived, $contentType); return $response; } /** - * Operation getByIdWithHttpInfo + * Operation getPageWithHttpInfo * - * Retrieve a custom action definition + * Retrieve custom action definitions * - * @param int $app_id The ID of the app associated with the action definition. (required) - * @param string $definition_id The ID of the action definition to retrieve. (required) + * @param int $app_id The unique identifier for the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionDefinition|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($app_id, $definition_id, $archived = false, string $contentType = self::contentTypes['getById'][0]) + public function getPageWithHttpInfo($app_id, $limit = null, $after = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getByIdRequest($app_id, $definition_id, $archived, $contentType); + $request = $this->getPageRequest($app_id, $limit, $after, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1340,7 +1394,7 @@ public function getByIdWithHttpInfo($app_id, $definition_id, $archived = false, switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', + '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging', $request, $response, ); @@ -1368,7 +1422,7 @@ public function getByIdWithHttpInfo($app_id, $definition_id, $archived = false, } return $this->handleResponseWithDataType( - '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', + '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging', $request, $response, ); @@ -1377,7 +1431,7 @@ public function getByIdWithHttpInfo($app_id, $definition_id, $archived = false, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition', + '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1398,21 +1452,22 @@ public function getByIdWithHttpInfo($app_id, $definition_id, $archived = false, } /** - * Operation getByIdAsync + * Operation getPageAsync * - * Retrieve a custom action definition + * Retrieve custom action definitions * - * @param int $app_id The ID of the app associated with the action definition. (required) - * @param string $definition_id The ID of the action definition to retrieve. (required) + * @param int $app_id The unique identifier for the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($app_id, $definition_id, $archived = false, string $contentType = self::contentTypes['getById'][0]) + public function getPageAsync($app_id, $limit = null, $after = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getByIdAsyncWithHttpInfo($app_id, $definition_id, $archived, $contentType) + return $this->getPageAsyncWithHttpInfo($app_id, $limit, $after, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1421,22 +1476,23 @@ function ($response) { } /** - * Operation getByIdAsyncWithHttpInfo + * Operation getPageAsyncWithHttpInfo * - * Retrieve a custom action definition + * Retrieve custom action definitions * - * @param int $app_id The ID of the app associated with the action definition. (required) - * @param string $definition_id The ID of the action definition to retrieve. (required) + * @param int $app_id The unique identifier for the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($app_id, $definition_id, $archived = false, string $contentType = self::contentTypes['getById'][0]) + public function getPageAsyncWithHttpInfo($app_id, $limit = null, $after = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition'; - $request = $this->getByIdRequest($app_id, $definition_id, $archived, $contentType); + $returnType = '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging'; + $request = $this->getPageRequest($app_id, $limit, $after, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1475,42 +1531,56 @@ function ($exception) { } /** - * Create request for operation 'getById' + * Create request for operation 'getPage' * - * @param int $app_id The ID of the app associated with the action definition. (required) - * @param string $definition_id The ID of the action definition to retrieve. (required) + * @param int $app_id The unique identifier for the app. (required) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($app_id, $definition_id, $archived = false, string $contentType = self::contentTypes['getById'][0]) + public function getPageRequest($app_id, $limit = null, $after = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getById' + 'Missing the required parameter $app_id when calling getPage' ); } - // verify the required parameter 'definition_id' is set - if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $definition_id when calling getById' - ); - } - $resourcePath = '/automation/v4/actions/{appId}/{definitionId}'; + + $resourcePath = '/automation/v4/actions/{appId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $archived, @@ -1530,14 +1600,6 @@ public function getByIdRequest($app_id, $definition_id, $archived = false, strin $resourcePath ); } - // path params - if ($definition_id !== null) { - $resourcePath = str_replace( - '{' . 'definitionId' . '}', - ObjectSerializer::toPathValue($definition_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -1599,44 +1661,41 @@ public function getByIdRequest($app_id, $definition_id, $archived = false, strin } /** - * Operation getPage + * Operation setObjectRequirement * - * Retrieve custom action definitions + * Set the object requirement for a custom action definition. * - * @param int $app_id The unique identifier for the app. (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation + * @param int $app_id The ID of the app associated with the custom action definition. (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectRequest $public_action_definition_requires_object_request public_action_definition_requires_object_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setObjectRequirement'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging|\HubSpot\Client\Automation\Actions\Model\Error + * @return void */ - public function getPage($app_id, $after = null, $archived = false, $limit = null, string $contentType = self::contentTypes['getPage'][0]) + public function setObjectRequirement($app_id, $definition_id, $public_action_definition_requires_object_request, string $contentType = self::contentTypes['setObjectRequirement'][0]) { - list($response) = $this->getPageWithHttpInfo($app_id, $after, $archived, $limit, $contentType); - return $response; + $this->setObjectRequirementWithHttpInfo($app_id, $definition_id, $public_action_definition_requires_object_request, $contentType); } /** - * Operation getPageWithHttpInfo + * Operation setObjectRequirementWithHttpInfo * - * Retrieve custom action definitions + * Set the object requirement for a custom action definition. * - * @param int $app_id The unique identifier for the app. (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation + * @param int $app_id The ID of the app associated with the custom action definition. (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectRequest $public_action_definition_requires_object_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setObjectRequirement'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($app_id, $after = null, $archived = false, $limit = null, string $contentType = self::contentTypes['getPage'][0]) + public function setObjectRequirementWithHttpInfo($app_id, $definition_id, $public_action_definition_requires_object_request, string $contentType = self::contentTypes['setObjectRequirement'][0]) { - $request = $this->getPageRequest($app_id, $after, $archived, $limit, $contentType); + $request = $this->setObjectRequirementRequest($app_id, $definition_id, $public_action_definition_requires_object_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -1661,51 +1720,9 @@ public function getPageWithHttpInfo($app_id, $after = null, $archived = false, $ $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging', - $request, - $response, - ); - default: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Automation\Actions\Model\Error', - $request, - $response, - ); - } - - - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return $this->handleResponseWithDataType( - '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging', - $request, - $response, - ); + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1722,22 +1739,21 @@ public function getPageWithHttpInfo($app_id, $after = null, $archived = false, $ } /** - * Operation getPageAsync + * Operation setObjectRequirementAsync * - * Retrieve custom action definitions + * Set the object requirement for a custom action definition. * - * @param int $app_id The unique identifier for the app. (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation + * @param int $app_id The ID of the app associated with the custom action definition. (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectRequest $public_action_definition_requires_object_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setObjectRequirement'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($app_id, $after = null, $archived = false, $limit = null, string $contentType = self::contentTypes['getPage'][0]) + public function setObjectRequirementAsync($app_id, $definition_id, $public_action_definition_requires_object_request, string $contentType = self::contentTypes['setObjectRequirement'][0]) { - return $this->getPageAsyncWithHttpInfo($app_id, $after, $archived, $limit, $contentType) + return $this->setObjectRequirementAsyncWithHttpInfo($app_id, $definition_id, $public_action_definition_requires_object_request, $contentType) ->then( function ($response) { return $response[0]; @@ -1746,42 +1762,28 @@ function ($response) { } /** - * Operation getPageAsyncWithHttpInfo + * Operation setObjectRequirementAsyncWithHttpInfo * - * Retrieve custom action definitions + * Set the object requirement for a custom action definition. * - * @param int $app_id The unique identifier for the app. (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation + * @param int $app_id The ID of the app associated with the custom action definition. (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectRequest $public_action_definition_requires_object_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setObjectRequirement'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($app_id, $after = null, $archived = false, $limit = null, string $contentType = self::contentTypes['getPage'][0]) + public function setObjectRequirementAsyncWithHttpInfo($app_id, $definition_id, $public_action_definition_requires_object_request, string $contentType = self::contentTypes['setObjectRequirement'][0]) { - $returnType = '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionDefinitionForwardPaging'; - $request = $this->getPageRequest($app_id, $after, $archived, $limit, $contentType); + $returnType = ''; + $request = $this->setObjectRequirementRequest($app_id, $definition_id, $public_action_definition_requires_object_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -1801,65 +1803,48 @@ function ($exception) { } /** - * Create request for operation 'getPage' + * Create request for operation 'setObjectRequirement' * - * @param int $app_id The unique identifier for the app. (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation + * @param int $app_id The ID of the app associated with the custom action definition. (required) + * @param string $definition_id The ID of the custom action definition. (required) + * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionRequiresObjectRequest $public_action_definition_requires_object_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['setObjectRequirement'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($app_id, $after = null, $archived = false, $limit = null, string $contentType = self::contentTypes['getPage'][0]) + public function setObjectRequirementRequest($app_id, $definition_id, $public_action_definition_requires_object_request, string $contentType = self::contentTypes['setObjectRequirement'][0]) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getPage' + 'Missing the required parameter $app_id when calling setObjectRequirement' ); } + // verify the required parameter 'definition_id' is set + if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $definition_id when calling setObjectRequirement' + ); + } + // verify the required parameter 'public_action_definition_requires_object_request' is set + if ($public_action_definition_requires_object_request === null || (is_array($public_action_definition_requires_object_request) && count($public_action_definition_requires_object_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $public_action_definition_requires_object_request when calling setObjectRequirement' + ); + } - - $resourcePath = '/automation/v4/actions/{appId}'; + $resourcePath = '/automation/v4/actions/{appId}/{definitionId}/requires-object'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -1870,16 +1855,31 @@ public function getPageRequest($app_id, $after = null, $archived = false, $limit $resourcePath ); } + // path params + if ($definition_id !== null) { + $resourcePath = str_replace( + '{' . 'definitionId' . '}', + ObjectSerializer::toPathValue($definition_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( - ['application/json', '*/*', ], + ['*/*', ], $contentType, $multipart ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($public_action_definition_requires_object_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($public_action_definition_requires_object_request), JSON_THROW_ON_ERROR); + } else { + $httpBody = $public_action_definition_requires_object_request; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1923,7 +1923,7 @@ public function getPageRequest($app_id, $after = null, $archived = false, $limit $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1935,8 +1935,8 @@ public function getPageRequest($app_id, $after = null, $archived = false, $limit * * Update an existing action definition * - * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $definition_id The ID of the action definition to update. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionPatch $public_action_definition_patch public_action_definition_patch (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -1944,9 +1944,9 @@ public function getPageRequest($app_id, $after = null, $archived = false, $limit * @throws \InvalidArgumentException * @return \HubSpot\Client\Automation\Actions\Model\PublicActionDefinition|\HubSpot\Client\Automation\Actions\Model\Error */ - public function update($app_id, $definition_id, $public_action_definition_patch, string $contentType = self::contentTypes['update'][0]) + public function update($definition_id, $app_id, $public_action_definition_patch, string $contentType = self::contentTypes['update'][0]) { - list($response) = $this->updateWithHttpInfo($app_id, $definition_id, $public_action_definition_patch, $contentType); + list($response) = $this->updateWithHttpInfo($definition_id, $app_id, $public_action_definition_patch, $contentType); return $response; } @@ -1955,8 +1955,8 @@ public function update($app_id, $definition_id, $public_action_definition_patch, * * Update an existing action definition * - * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $definition_id The ID of the action definition to update. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionPatch $public_action_definition_patch (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -1964,9 +1964,9 @@ public function update($app_id, $definition_id, $public_action_definition_patch, * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionDefinition|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateWithHttpInfo($app_id, $definition_id, $public_action_definition_patch, string $contentType = self::contentTypes['update'][0]) + public function updateWithHttpInfo($definition_id, $app_id, $public_action_definition_patch, string $contentType = self::contentTypes['update'][0]) { - $request = $this->updateRequest($app_id, $definition_id, $public_action_definition_patch, $contentType); + $request = $this->updateRequest($definition_id, $app_id, $public_action_definition_patch, $contentType); try { $options = $this->createHttpClientOption(); @@ -2056,17 +2056,17 @@ public function updateWithHttpInfo($app_id, $definition_id, $public_action_defin * * Update an existing action definition * - * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $definition_id The ID of the action definition to update. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionPatch $public_action_definition_patch (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsync($app_id, $definition_id, $public_action_definition_patch, string $contentType = self::contentTypes['update'][0]) + public function updateAsync($definition_id, $app_id, $public_action_definition_patch, string $contentType = self::contentTypes['update'][0]) { - return $this->updateAsyncWithHttpInfo($app_id, $definition_id, $public_action_definition_patch, $contentType) + return $this->updateAsyncWithHttpInfo($definition_id, $app_id, $public_action_definition_patch, $contentType) ->then( function ($response) { return $response[0]; @@ -2079,18 +2079,18 @@ function ($response) { * * Update an existing action definition * - * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $definition_id The ID of the action definition to update. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionPatch $public_action_definition_patch (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsyncWithHttpInfo($app_id, $definition_id, $public_action_definition_patch, string $contentType = self::contentTypes['update'][0]) + public function updateAsyncWithHttpInfo($definition_id, $app_id, $public_action_definition_patch, string $contentType = self::contentTypes['update'][0]) { $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionDefinition'; - $request = $this->updateRequest($app_id, $definition_id, $public_action_definition_patch, $contentType); + $request = $this->updateRequest($definition_id, $app_id, $public_action_definition_patch, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2131,28 +2131,28 @@ function ($exception) { /** * Create request for operation 'update' * - * @param int $app_id The ID of the app associated with the action definition. (required) * @param string $definition_id The ID of the action definition to update. (required) + * @param int $app_id The ID of the app associated with the action definition. (required) * @param \HubSpot\Client\Automation\Actions\Model\PublicActionDefinitionPatch $public_action_definition_patch (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateRequest($app_id, $definition_id, $public_action_definition_patch, string $contentType = self::contentTypes['update'][0]) + public function updateRequest($definition_id, $app_id, $public_action_definition_patch, string $contentType = self::contentTypes['update'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'definition_id' is set + if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling update' + 'Missing the required parameter $definition_id when calling update' ); } - // verify the required parameter 'definition_id' is set - if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $definition_id when calling update' + 'Missing the required parameter $app_id when calling update' ); } @@ -2174,18 +2174,18 @@ public function updateRequest($app_id, $definition_id, $public_action_definition // path params - if ($app_id !== null) { + if ($definition_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'definitionId' . '}', + ObjectSerializer::toPathValue($definition_id), $resourcePath ); } // path params - if ($definition_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'definitionId' . '}', - ObjectSerializer::toPathValue($definition_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } diff --git a/codegen/Automation/Actions/Api/FunctionsApi.php b/codegen/Automation/Actions/Api/FunctionsApi.php index 686845ec..2dd5241c 100644 --- a/codegen/Automation/Actions/Api/FunctionsApi.php +++ b/codegen/Automation/Actions/Api/FunctionsApi.php @@ -147,19 +147,19 @@ public function getConfig() * * Archive a function for a definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function archive($app_id, $definition_id, $function_id, $function_type, string $contentType = self::contentTypes['archive'][0]) + public function archive($definition_id, $function_type, $function_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - $this->archiveWithHttpInfo($app_id, $definition_id, $function_id, $function_type, $contentType); + $this->archiveWithHttpInfo($definition_id, $function_type, $function_id, $app_id, $contentType); } /** @@ -167,19 +167,19 @@ public function archive($app_id, $definition_id, $function_id, $function_type, s * * Archive a function for a definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveWithHttpInfo($app_id, $definition_id, $function_id, $function_type, string $contentType = self::contentTypes['archive'][0]) + public function archiveWithHttpInfo($definition_id, $function_type, $function_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - $request = $this->archiveRequest($app_id, $definition_id, $function_id, $function_type, $contentType); + $request = $this->archiveRequest($definition_id, $function_type, $function_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -227,18 +227,18 @@ public function archiveWithHttpInfo($app_id, $definition_id, $function_id, $func * * Archive a function for a definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsync($app_id, $definition_id, $function_id, $function_type, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsync($definition_id, $function_type, $function_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - return $this->archiveAsyncWithHttpInfo($app_id, $definition_id, $function_id, $function_type, $contentType) + return $this->archiveAsyncWithHttpInfo($definition_id, $function_type, $function_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -251,19 +251,19 @@ function ($response) { * * Archive a function for a definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsyncWithHttpInfo($app_id, $definition_id, $function_id, $function_type, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsyncWithHttpInfo($definition_id, $function_type, $function_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { $returnType = ''; - $request = $this->archiveRequest($app_id, $definition_id, $function_id, $function_type, $contentType); + $request = $this->archiveRequest($definition_id, $function_type, $function_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -291,29 +291,29 @@ function ($exception) { /** * Create request for operation 'archive' * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveRequest($app_id, $definition_id, $function_id, $function_type, string $contentType = self::contentTypes['archive'][0]) + public function archiveRequest($definition_id, $function_type, $function_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'definition_id' is set + if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling archive' + 'Missing the required parameter $definition_id when calling archive' ); } - // verify the required parameter 'definition_id' is set - if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { + // verify the required parameter 'function_type' is set + if ($function_type === null || (is_array($function_type) && count($function_type) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $definition_id when calling archive' + 'Missing the required parameter $function_type when calling archive' ); } @@ -324,10 +324,10 @@ public function archiveRequest($app_id, $definition_id, $function_id, $function_ ); } - // verify the required parameter 'function_type' is set - if ($function_type === null || (is_array($function_type) && count($function_type) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $function_type when calling archive' + 'Missing the required parameter $app_id when calling archive' ); } @@ -342,18 +342,18 @@ public function archiveRequest($app_id, $definition_id, $function_id, $function_ // path params - if ($app_id !== null) { + if ($definition_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'definitionId' . '}', + ObjectSerializer::toPathValue($definition_id), $resourcePath ); } // path params - if ($definition_id !== null) { + if ($function_type !== null) { $resourcePath = str_replace( - '{' . 'definitionId' . '}', - ObjectSerializer::toPathValue($definition_id), + '{' . 'functionType' . '}', + ObjectSerializer::toPathValue($function_type), $resourcePath ); } @@ -366,10 +366,10 @@ public function archiveRequest($app_id, $definition_id, $function_id, $function_ ); } // path params - if ($function_type !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'functionType' . '}', - ObjectSerializer::toPathValue($function_type), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -438,18 +438,18 @@ public function archiveRequest($app_id, $definition_id, $function_id, $function_ * * Delete a function for a definition * - * @param int $app_id The ID of the app from which the function will be deleted. (required) * @param string $definition_id The ID of the definition from which the function will be deleted. (required) * @param string $function_type The type of function to delete, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app from which the function will be deleted. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveByFunctionType'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function archiveByFunctionType($app_id, $definition_id, $function_type, string $contentType = self::contentTypes['archiveByFunctionType'][0]) + public function archiveByFunctionType($definition_id, $function_type, $app_id, string $contentType = self::contentTypes['archiveByFunctionType'][0]) { - $this->archiveByFunctionTypeWithHttpInfo($app_id, $definition_id, $function_type, $contentType); + $this->archiveByFunctionTypeWithHttpInfo($definition_id, $function_type, $app_id, $contentType); } /** @@ -457,18 +457,18 @@ public function archiveByFunctionType($app_id, $definition_id, $function_type, s * * Delete a function for a definition * - * @param int $app_id The ID of the app from which the function will be deleted. (required) * @param string $definition_id The ID of the definition from which the function will be deleted. (required) * @param string $function_type The type of function to delete, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app from which the function will be deleted. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveByFunctionType'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveByFunctionTypeWithHttpInfo($app_id, $definition_id, $function_type, string $contentType = self::contentTypes['archiveByFunctionType'][0]) + public function archiveByFunctionTypeWithHttpInfo($definition_id, $function_type, $app_id, string $contentType = self::contentTypes['archiveByFunctionType'][0]) { - $request = $this->archiveByFunctionTypeRequest($app_id, $definition_id, $function_type, $contentType); + $request = $this->archiveByFunctionTypeRequest($definition_id, $function_type, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -516,17 +516,17 @@ public function archiveByFunctionTypeWithHttpInfo($app_id, $definition_id, $func * * Delete a function for a definition * - * @param int $app_id The ID of the app from which the function will be deleted. (required) * @param string $definition_id The ID of the definition from which the function will be deleted. (required) * @param string $function_type The type of function to delete, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app from which the function will be deleted. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveByFunctionTypeAsync($app_id, $definition_id, $function_type, string $contentType = self::contentTypes['archiveByFunctionType'][0]) + public function archiveByFunctionTypeAsync($definition_id, $function_type, $app_id, string $contentType = self::contentTypes['archiveByFunctionType'][0]) { - return $this->archiveByFunctionTypeAsyncWithHttpInfo($app_id, $definition_id, $function_type, $contentType) + return $this->archiveByFunctionTypeAsyncWithHttpInfo($definition_id, $function_type, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -539,18 +539,18 @@ function ($response) { * * Delete a function for a definition * - * @param int $app_id The ID of the app from which the function will be deleted. (required) * @param string $definition_id The ID of the definition from which the function will be deleted. (required) * @param string $function_type The type of function to delete, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app from which the function will be deleted. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveByFunctionTypeAsyncWithHttpInfo($app_id, $definition_id, $function_type, string $contentType = self::contentTypes['archiveByFunctionType'][0]) + public function archiveByFunctionTypeAsyncWithHttpInfo($definition_id, $function_type, $app_id, string $contentType = self::contentTypes['archiveByFunctionType'][0]) { $returnType = ''; - $request = $this->archiveByFunctionTypeRequest($app_id, $definition_id, $function_type, $contentType); + $request = $this->archiveByFunctionTypeRequest($definition_id, $function_type, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -578,24 +578,17 @@ function ($exception) { /** * Create request for operation 'archiveByFunctionType' * - * @param int $app_id The ID of the app from which the function will be deleted. (required) * @param string $definition_id The ID of the definition from which the function will be deleted. (required) * @param string $function_type The type of function to delete, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app from which the function will be deleted. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveByFunctionTypeRequest($app_id, $definition_id, $function_type, string $contentType = self::contentTypes['archiveByFunctionType'][0]) + public function archiveByFunctionTypeRequest($definition_id, $function_type, $app_id, string $contentType = self::contentTypes['archiveByFunctionType'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling archiveByFunctionType' - ); - } - // verify the required parameter 'definition_id' is set if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( @@ -610,6 +603,13 @@ public function archiveByFunctionTypeRequest($app_id, $definition_id, $function_ ); } + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app_id when calling archiveByFunctionType' + ); + } + $resourcePath = '/automation/v4/actions/{appId}/{definitionId}/functions/{functionType}'; $formParams = []; @@ -620,14 +620,6 @@ public function archiveByFunctionTypeRequest($app_id, $definition_id, $function_ - // path params - if ($app_id !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), - $resourcePath - ); - } // path params if ($definition_id !== null) { $resourcePath = str_replace( @@ -644,6 +636,14 @@ public function archiveByFunctionTypeRequest($app_id, $definition_id, $function_ $resourcePath ); } + // path params + if ($app_id !== null) { + $resourcePath = str_replace( + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -709,10 +709,10 @@ public function archiveByFunctionTypeRequest($app_id, $definition_id, $function_ * * Update a function for a definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $body body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplace'] to see the possible values for this operation * @@ -720,9 +720,9 @@ public function archiveByFunctionTypeRequest($app_id, $definition_id, $function_ * @throws \InvalidArgumentException * @return \HubSpot\Client\Automation\Actions\Model\PublicActionFunctionIdentifier|\HubSpot\Client\Automation\Actions\Model\Error */ - public function createOrReplace($app_id, $definition_id, $function_id, $function_type, $body, string $contentType = self::contentTypes['createOrReplace'][0]) + public function createOrReplace($definition_id, $function_type, $function_id, $app_id, $body, string $contentType = self::contentTypes['createOrReplace'][0]) { - list($response) = $this->createOrReplaceWithHttpInfo($app_id, $definition_id, $function_id, $function_type, $body, $contentType); + list($response) = $this->createOrReplaceWithHttpInfo($definition_id, $function_type, $function_id, $app_id, $body, $contentType); return $response; } @@ -731,10 +731,10 @@ public function createOrReplace($app_id, $definition_id, $function_id, $function * * Update a function for a definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplace'] to see the possible values for this operation * @@ -742,9 +742,9 @@ public function createOrReplace($app_id, $definition_id, $function_id, $function * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionFunctionIdentifier|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function createOrReplaceWithHttpInfo($app_id, $definition_id, $function_id, $function_type, $body, string $contentType = self::contentTypes['createOrReplace'][0]) + public function createOrReplaceWithHttpInfo($definition_id, $function_type, $function_id, $app_id, $body, string $contentType = self::contentTypes['createOrReplace'][0]) { - $request = $this->createOrReplaceRequest($app_id, $definition_id, $function_id, $function_type, $body, $contentType); + $request = $this->createOrReplaceRequest($definition_id, $function_type, $function_id, $app_id, $body, $contentType); try { $options = $this->createHttpClientOption(); @@ -834,19 +834,19 @@ public function createOrReplaceWithHttpInfo($app_id, $definition_id, $function_i * * Update a function for a definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplace'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createOrReplaceAsync($app_id, $definition_id, $function_id, $function_type, $body, string $contentType = self::contentTypes['createOrReplace'][0]) + public function createOrReplaceAsync($definition_id, $function_type, $function_id, $app_id, $body, string $contentType = self::contentTypes['createOrReplace'][0]) { - return $this->createOrReplaceAsyncWithHttpInfo($app_id, $definition_id, $function_id, $function_type, $body, $contentType) + return $this->createOrReplaceAsyncWithHttpInfo($definition_id, $function_type, $function_id, $app_id, $body, $contentType) ->then( function ($response) { return $response[0]; @@ -859,20 +859,20 @@ function ($response) { * * Update a function for a definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplace'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createOrReplaceAsyncWithHttpInfo($app_id, $definition_id, $function_id, $function_type, $body, string $contentType = self::contentTypes['createOrReplace'][0]) + public function createOrReplaceAsyncWithHttpInfo($definition_id, $function_type, $function_id, $app_id, $body, string $contentType = self::contentTypes['createOrReplace'][0]) { $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionFunctionIdentifier'; - $request = $this->createOrReplaceRequest($app_id, $definition_id, $function_id, $function_type, $body, $contentType); + $request = $this->createOrReplaceRequest($definition_id, $function_type, $function_id, $app_id, $body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -913,30 +913,30 @@ function ($exception) { /** * Create request for operation 'createOrReplace' * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplace'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createOrReplaceRequest($app_id, $definition_id, $function_id, $function_type, $body, string $contentType = self::contentTypes['createOrReplace'][0]) + public function createOrReplaceRequest($definition_id, $function_type, $function_id, $app_id, $body, string $contentType = self::contentTypes['createOrReplace'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'definition_id' is set + if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling createOrReplace' + 'Missing the required parameter $definition_id when calling createOrReplace' ); } - // verify the required parameter 'definition_id' is set - if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { + // verify the required parameter 'function_type' is set + if ($function_type === null || (is_array($function_type) && count($function_type) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $definition_id when calling createOrReplace' + 'Missing the required parameter $function_type when calling createOrReplace' ); } @@ -947,10 +947,10 @@ public function createOrReplaceRequest($app_id, $definition_id, $function_id, $f ); } - // verify the required parameter 'function_type' is set - if ($function_type === null || (is_array($function_type) && count($function_type) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $function_type when calling createOrReplace' + 'Missing the required parameter $app_id when calling createOrReplace' ); } @@ -972,18 +972,18 @@ public function createOrReplaceRequest($app_id, $definition_id, $function_id, $f // path params - if ($app_id !== null) { + if ($definition_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'definitionId' . '}', + ObjectSerializer::toPathValue($definition_id), $resourcePath ); } // path params - if ($definition_id !== null) { + if ($function_type !== null) { $resourcePath = str_replace( - '{' . 'definitionId' . '}', - ObjectSerializer::toPathValue($definition_id), + '{' . 'functionType' . '}', + ObjectSerializer::toPathValue($function_type), $resourcePath ); } @@ -996,10 +996,10 @@ public function createOrReplaceRequest($app_id, $definition_id, $function_id, $f ); } // path params - if ($function_type !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'functionType' . '}', - ObjectSerializer::toPathValue($function_type), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -1075,9 +1075,9 @@ public function createOrReplaceRequest($app_id, $definition_id, $function_id, $f * * Insert a function for a definition * - * @param int $app_id The ID of the app to which the function will be added. (required) * @param string $definition_id The ID of the definition to which the function will be added. (required) * @param string $function_type The type of function to add, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app to which the function will be added. (required) * @param string $body body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplaceByFunctionType'] to see the possible values for this operation * @@ -1085,9 +1085,9 @@ public function createOrReplaceRequest($app_id, $definition_id, $function_id, $f * @throws \InvalidArgumentException * @return \HubSpot\Client\Automation\Actions\Model\PublicActionFunctionIdentifier|\HubSpot\Client\Automation\Actions\Model\Error */ - public function createOrReplaceByFunctionType($app_id, $definition_id, $function_type, $body, string $contentType = self::contentTypes['createOrReplaceByFunctionType'][0]) + public function createOrReplaceByFunctionType($definition_id, $function_type, $app_id, $body, string $contentType = self::contentTypes['createOrReplaceByFunctionType'][0]) { - list($response) = $this->createOrReplaceByFunctionTypeWithHttpInfo($app_id, $definition_id, $function_type, $body, $contentType); + list($response) = $this->createOrReplaceByFunctionTypeWithHttpInfo($definition_id, $function_type, $app_id, $body, $contentType); return $response; } @@ -1096,9 +1096,9 @@ public function createOrReplaceByFunctionType($app_id, $definition_id, $function * * Insert a function for a definition * - * @param int $app_id The ID of the app to which the function will be added. (required) * @param string $definition_id The ID of the definition to which the function will be added. (required) * @param string $function_type The type of function to add, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app to which the function will be added. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplaceByFunctionType'] to see the possible values for this operation * @@ -1106,9 +1106,9 @@ public function createOrReplaceByFunctionType($app_id, $definition_id, $function * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionFunctionIdentifier|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function createOrReplaceByFunctionTypeWithHttpInfo($app_id, $definition_id, $function_type, $body, string $contentType = self::contentTypes['createOrReplaceByFunctionType'][0]) + public function createOrReplaceByFunctionTypeWithHttpInfo($definition_id, $function_type, $app_id, $body, string $contentType = self::contentTypes['createOrReplaceByFunctionType'][0]) { - $request = $this->createOrReplaceByFunctionTypeRequest($app_id, $definition_id, $function_type, $body, $contentType); + $request = $this->createOrReplaceByFunctionTypeRequest($definition_id, $function_type, $app_id, $body, $contentType); try { $options = $this->createHttpClientOption(); @@ -1198,18 +1198,18 @@ public function createOrReplaceByFunctionTypeWithHttpInfo($app_id, $definition_i * * Insert a function for a definition * - * @param int $app_id The ID of the app to which the function will be added. (required) * @param string $definition_id The ID of the definition to which the function will be added. (required) * @param string $function_type The type of function to add, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app to which the function will be added. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplaceByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createOrReplaceByFunctionTypeAsync($app_id, $definition_id, $function_type, $body, string $contentType = self::contentTypes['createOrReplaceByFunctionType'][0]) + public function createOrReplaceByFunctionTypeAsync($definition_id, $function_type, $app_id, $body, string $contentType = self::contentTypes['createOrReplaceByFunctionType'][0]) { - return $this->createOrReplaceByFunctionTypeAsyncWithHttpInfo($app_id, $definition_id, $function_type, $body, $contentType) + return $this->createOrReplaceByFunctionTypeAsyncWithHttpInfo($definition_id, $function_type, $app_id, $body, $contentType) ->then( function ($response) { return $response[0]; @@ -1222,19 +1222,19 @@ function ($response) { * * Insert a function for a definition * - * @param int $app_id The ID of the app to which the function will be added. (required) * @param string $definition_id The ID of the definition to which the function will be added. (required) * @param string $function_type The type of function to add, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app to which the function will be added. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplaceByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function createOrReplaceByFunctionTypeAsyncWithHttpInfo($app_id, $definition_id, $function_type, $body, string $contentType = self::contentTypes['createOrReplaceByFunctionType'][0]) + public function createOrReplaceByFunctionTypeAsyncWithHttpInfo($definition_id, $function_type, $app_id, $body, string $contentType = self::contentTypes['createOrReplaceByFunctionType'][0]) { $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionFunctionIdentifier'; - $request = $this->createOrReplaceByFunctionTypeRequest($app_id, $definition_id, $function_type, $body, $contentType); + $request = $this->createOrReplaceByFunctionTypeRequest($definition_id, $function_type, $app_id, $body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1275,25 +1275,18 @@ function ($exception) { /** * Create request for operation 'createOrReplaceByFunctionType' * - * @param int $app_id The ID of the app to which the function will be added. (required) * @param string $definition_id The ID of the definition to which the function will be added. (required) * @param string $function_type The type of function to add, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app to which the function will be added. (required) * @param string $body (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createOrReplaceByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function createOrReplaceByFunctionTypeRequest($app_id, $definition_id, $function_type, $body, string $contentType = self::contentTypes['createOrReplaceByFunctionType'][0]) + public function createOrReplaceByFunctionTypeRequest($definition_id, $function_type, $app_id, $body, string $contentType = self::contentTypes['createOrReplaceByFunctionType'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling createOrReplaceByFunctionType' - ); - } - // verify the required parameter 'definition_id' is set if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( @@ -1308,6 +1301,13 @@ public function createOrReplaceByFunctionTypeRequest($app_id, $definition_id, $f ); } + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app_id when calling createOrReplaceByFunctionType' + ); + } + // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( @@ -1325,14 +1325,6 @@ public function createOrReplaceByFunctionTypeRequest($app_id, $definition_id, $f - // path params - if ($app_id !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), - $resourcePath - ); - } // path params if ($definition_id !== null) { $resourcePath = str_replace( @@ -1349,6 +1341,14 @@ public function createOrReplaceByFunctionTypeRequest($app_id, $definition_id, $f $resourcePath ); } + // path params + if ($app_id !== null) { + $resourcePath = str_replace( + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -1421,18 +1421,18 @@ public function createOrReplaceByFunctionTypeRequest($app_id, $definition_id, $f * * Retrieve functions by a type for a given definition * - * @param int $app_id The ID of the app associated with the function. (required) * @param string $definition_id The ID of the definition associated with the function. (required) * @param string $function_type The type of function to retrieve, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app associated with the function. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByFunctionType'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Automation\Actions\Model\PublicActionFunction|\HubSpot\Client\Automation\Actions\Model\Error */ - public function getByFunctionType($app_id, $definition_id, $function_type, string $contentType = self::contentTypes['getByFunctionType'][0]) + public function getByFunctionType($definition_id, $function_type, $app_id, string $contentType = self::contentTypes['getByFunctionType'][0]) { - list($response) = $this->getByFunctionTypeWithHttpInfo($app_id, $definition_id, $function_type, $contentType); + list($response) = $this->getByFunctionTypeWithHttpInfo($definition_id, $function_type, $app_id, $contentType); return $response; } @@ -1441,18 +1441,18 @@ public function getByFunctionType($app_id, $definition_id, $function_type, strin * * Retrieve functions by a type for a given definition * - * @param int $app_id The ID of the app associated with the function. (required) * @param string $definition_id The ID of the definition associated with the function. (required) * @param string $function_type The type of function to retrieve, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app associated with the function. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByFunctionType'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionFunction|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByFunctionTypeWithHttpInfo($app_id, $definition_id, $function_type, string $contentType = self::contentTypes['getByFunctionType'][0]) + public function getByFunctionTypeWithHttpInfo($definition_id, $function_type, $app_id, string $contentType = self::contentTypes['getByFunctionType'][0]) { - $request = $this->getByFunctionTypeRequest($app_id, $definition_id, $function_type, $contentType); + $request = $this->getByFunctionTypeRequest($definition_id, $function_type, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1542,17 +1542,17 @@ public function getByFunctionTypeWithHttpInfo($app_id, $definition_id, $function * * Retrieve functions by a type for a given definition * - * @param int $app_id The ID of the app associated with the function. (required) * @param string $definition_id The ID of the definition associated with the function. (required) * @param string $function_type The type of function to retrieve, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app associated with the function. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByFunctionTypeAsync($app_id, $definition_id, $function_type, string $contentType = self::contentTypes['getByFunctionType'][0]) + public function getByFunctionTypeAsync($definition_id, $function_type, $app_id, string $contentType = self::contentTypes['getByFunctionType'][0]) { - return $this->getByFunctionTypeAsyncWithHttpInfo($app_id, $definition_id, $function_type, $contentType) + return $this->getByFunctionTypeAsyncWithHttpInfo($definition_id, $function_type, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1565,18 +1565,18 @@ function ($response) { * * Retrieve functions by a type for a given definition * - * @param int $app_id The ID of the app associated with the function. (required) * @param string $definition_id The ID of the definition associated with the function. (required) * @param string $function_type The type of function to retrieve, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app associated with the function. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByFunctionTypeAsyncWithHttpInfo($app_id, $definition_id, $function_type, string $contentType = self::contentTypes['getByFunctionType'][0]) + public function getByFunctionTypeAsyncWithHttpInfo($definition_id, $function_type, $app_id, string $contentType = self::contentTypes['getByFunctionType'][0]) { $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionFunction'; - $request = $this->getByFunctionTypeRequest($app_id, $definition_id, $function_type, $contentType); + $request = $this->getByFunctionTypeRequest($definition_id, $function_type, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1617,24 +1617,17 @@ function ($exception) { /** * Create request for operation 'getByFunctionType' * - * @param int $app_id The ID of the app associated with the function. (required) * @param string $definition_id The ID of the definition associated with the function. (required) * @param string $function_type The type of function to retrieve, with accepted values: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param int $app_id The ID of the app associated with the function. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByFunctionType'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByFunctionTypeRequest($app_id, $definition_id, $function_type, string $contentType = self::contentTypes['getByFunctionType'][0]) + public function getByFunctionTypeRequest($definition_id, $function_type, $app_id, string $contentType = self::contentTypes['getByFunctionType'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getByFunctionType' - ); - } - // verify the required parameter 'definition_id' is set if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( @@ -1649,6 +1642,13 @@ public function getByFunctionTypeRequest($app_id, $definition_id, $function_type ); } + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app_id when calling getByFunctionType' + ); + } + $resourcePath = '/automation/v4/actions/{appId}/{definitionId}/functions/{functionType}'; $formParams = []; @@ -1659,14 +1659,6 @@ public function getByFunctionTypeRequest($app_id, $definition_id, $function_type - // path params - if ($app_id !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), - $resourcePath - ); - } // path params if ($definition_id !== null) { $resourcePath = str_replace( @@ -1683,6 +1675,14 @@ public function getByFunctionTypeRequest($app_id, $definition_id, $function_type $resourcePath ); } + // path params + if ($app_id !== null) { + $resourcePath = str_replace( + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -1748,19 +1748,19 @@ public function getByFunctionTypeRequest($app_id, $definition_id, $function_type * * Retrieve a function from a given definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Automation\Actions\Model\PublicActionFunction|\HubSpot\Client\Automation\Actions\Model\Error */ - public function getById($app_id, $definition_id, $function_id, $function_type, string $contentType = self::contentTypes['getById'][0]) + public function getById($definition_id, $function_type, $function_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($app_id, $definition_id, $function_id, $function_type, $contentType); + list($response) = $this->getByIdWithHttpInfo($definition_id, $function_type, $function_id, $app_id, $contentType); return $response; } @@ -1769,19 +1769,19 @@ public function getById($app_id, $definition_id, $function_id, $function_type, s * * Retrieve a function from a given definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionFunction|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($app_id, $definition_id, $function_id, $function_type, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($definition_id, $function_type, $function_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($app_id, $definition_id, $function_id, $function_type, $contentType); + $request = $this->getByIdRequest($definition_id, $function_type, $function_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1871,18 +1871,18 @@ public function getByIdWithHttpInfo($app_id, $definition_id, $function_id, $func * * Retrieve a function from a given definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($app_id, $definition_id, $function_id, $function_type, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($definition_id, $function_type, $function_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($app_id, $definition_id, $function_id, $function_type, $contentType) + return $this->getByIdAsyncWithHttpInfo($definition_id, $function_type, $function_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1895,19 +1895,19 @@ function ($response) { * * Retrieve a function from a given definition * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($app_id, $definition_id, $function_id, $function_type, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($definition_id, $function_type, $function_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionFunction'; - $request = $this->getByIdRequest($app_id, $definition_id, $function_id, $function_type, $contentType); + $request = $this->getByIdRequest($definition_id, $function_type, $function_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1948,29 +1948,29 @@ function ($exception) { /** * Create request for operation 'getById' * - * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $definition_id The ID of the custom workflow action definition. (required) - * @param string $function_id The ID of the specific function within the workflow action definition. (required) * @param string $function_type The type of function, accepted values are: POST_ACTION_EXECUTION, POST_FETCH_OPTIONS, PRE_ACTION_EXECUTION, PRE_FETCH_OPTIONS. (required) + * @param string $function_id The ID of the specific function within the workflow action definition. (required) + * @param int $app_id The ID of the application associated with the custom workflow action. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($app_id, $definition_id, $function_id, $function_type, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($definition_id, $function_type, $function_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'definition_id' is set + if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getById' + 'Missing the required parameter $definition_id when calling getById' ); } - // verify the required parameter 'definition_id' is set - if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { + // verify the required parameter 'function_type' is set + if ($function_type === null || (is_array($function_type) && count($function_type) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $definition_id when calling getById' + 'Missing the required parameter $function_type when calling getById' ); } @@ -1981,10 +1981,10 @@ public function getByIdRequest($app_id, $definition_id, $function_id, $function_ ); } - // verify the required parameter 'function_type' is set - if ($function_type === null || (is_array($function_type) && count($function_type) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $function_type when calling getById' + 'Missing the required parameter $app_id when calling getById' ); } @@ -1999,18 +1999,18 @@ public function getByIdRequest($app_id, $definition_id, $function_id, $function_ // path params - if ($app_id !== null) { + if ($definition_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'definitionId' . '}', + ObjectSerializer::toPathValue($definition_id), $resourcePath ); } // path params - if ($definition_id !== null) { + if ($function_type !== null) { $resourcePath = str_replace( - '{' . 'definitionId' . '}', - ObjectSerializer::toPathValue($definition_id), + '{' . 'functionType' . '}', + ObjectSerializer::toPathValue($function_type), $resourcePath ); } @@ -2023,10 +2023,10 @@ public function getByIdRequest($app_id, $definition_id, $function_id, $function_ ); } // path params - if ($function_type !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'functionType' . '}', - ObjectSerializer::toPathValue($function_type), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -2095,17 +2095,17 @@ public function getByIdRequest($app_id, $definition_id, $function_id, $function_ * * Retrieve functions for a given definition * - * @param int $app_id The unique identifier for the app. (required) * @param string $definition_id The unique identifier for the action definition. (required) + * @param int $app_id The unique identifier for the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionFunctionIdentifierNoPaging|\HubSpot\Client\Automation\Actions\Model\Error */ - public function getPage($app_id, $definition_id, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($definition_id, $app_id, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($app_id, $definition_id, $contentType); + list($response) = $this->getPageWithHttpInfo($definition_id, $app_id, $contentType); return $response; } @@ -2114,17 +2114,17 @@ public function getPage($app_id, $definition_id, string $contentType = self::con * * Retrieve functions for a given definition * - * @param int $app_id The unique identifier for the app. (required) * @param string $definition_id The unique identifier for the action definition. (required) + * @param int $app_id The unique identifier for the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionFunctionIdentifierNoPaging|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($app_id, $definition_id, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($definition_id, $app_id, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($app_id, $definition_id, $contentType); + $request = $this->getPageRequest($definition_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2214,16 +2214,16 @@ public function getPageWithHttpInfo($app_id, $definition_id, string $contentType * * Retrieve functions for a given definition * - * @param int $app_id The unique identifier for the app. (required) * @param string $definition_id The unique identifier for the action definition. (required) + * @param int $app_id The unique identifier for the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($app_id, $definition_id, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($definition_id, $app_id, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($app_id, $definition_id, $contentType) + return $this->getPageAsyncWithHttpInfo($definition_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -2236,17 +2236,17 @@ function ($response) { * * Retrieve functions for a given definition * - * @param int $app_id The unique identifier for the app. (required) * @param string $definition_id The unique identifier for the action definition. (required) + * @param int $app_id The unique identifier for the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($app_id, $definition_id, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($definition_id, $app_id, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionFunctionIdentifierNoPaging'; - $request = $this->getPageRequest($app_id, $definition_id, $contentType); + $request = $this->getPageRequest($definition_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2287,27 +2287,27 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param int $app_id The unique identifier for the app. (required) * @param string $definition_id The unique identifier for the action definition. (required) + * @param int $app_id The unique identifier for the app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($app_id, $definition_id, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($definition_id, $app_id, string $contentType = self::contentTypes['getPage'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'definition_id' is set + if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getPage' + 'Missing the required parameter $definition_id when calling getPage' ); } - // verify the required parameter 'definition_id' is set - if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $definition_id when calling getPage' + 'Missing the required parameter $app_id when calling getPage' ); } @@ -2322,18 +2322,18 @@ public function getPageRequest($app_id, $definition_id, string $contentType = se // path params - if ($app_id !== null) { + if ($definition_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'definitionId' . '}', + ObjectSerializer::toPathValue($definition_id), $resourcePath ); } // path params - if ($definition_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'definitionId' . '}', - ObjectSerializer::toPathValue($definition_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } diff --git a/codegen/Automation/Actions/Api/RevisionsApi.php b/codegen/Automation/Actions/Api/RevisionsApi.php index d46553c5..87bd6dd4 100644 --- a/codegen/Automation/Actions/Api/RevisionsApi.php +++ b/codegen/Automation/Actions/Api/RevisionsApi.php @@ -132,18 +132,18 @@ public function getConfig() * * Retrieve a specific revision of a definition * - * @param int $app_id app_id (required) * @param string $definition_id definition_id (required) * @param string $revision_id revision_id (required) + * @param int $app_id app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Automation\Actions\Model\PublicActionRevision|\HubSpot\Client\Automation\Actions\Model\Error */ - public function getById($app_id, $definition_id, $revision_id, string $contentType = self::contentTypes['getById'][0]) + public function getById($definition_id, $revision_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($app_id, $definition_id, $revision_id, $contentType); + list($response) = $this->getByIdWithHttpInfo($definition_id, $revision_id, $app_id, $contentType); return $response; } @@ -152,18 +152,18 @@ public function getById($app_id, $definition_id, $revision_id, string $contentTy * * Retrieve a specific revision of a definition * - * @param int $app_id (required) * @param string $definition_id (required) * @param string $revision_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Automation\Actions\Model\PublicActionRevision|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($app_id, $definition_id, $revision_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($definition_id, $revision_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($app_id, $definition_id, $revision_id, $contentType); + $request = $this->getByIdRequest($definition_id, $revision_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -253,17 +253,17 @@ public function getByIdWithHttpInfo($app_id, $definition_id, $revision_id, strin * * Retrieve a specific revision of a definition * - * @param int $app_id (required) * @param string $definition_id (required) * @param string $revision_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($app_id, $definition_id, $revision_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($definition_id, $revision_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($app_id, $definition_id, $revision_id, $contentType) + return $this->getByIdAsyncWithHttpInfo($definition_id, $revision_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -276,18 +276,18 @@ function ($response) { * * Retrieve a specific revision of a definition * - * @param int $app_id (required) * @param string $definition_id (required) * @param string $revision_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($app_id, $definition_id, $revision_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($definition_id, $revision_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Automation\Actions\Model\PublicActionRevision'; - $request = $this->getByIdRequest($app_id, $definition_id, $revision_id, $contentType); + $request = $this->getByIdRequest($definition_id, $revision_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -328,24 +328,17 @@ function ($exception) { /** * Create request for operation 'getById' * - * @param int $app_id (required) * @param string $definition_id (required) * @param string $revision_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($app_id, $definition_id, $revision_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($definition_id, $revision_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getById' - ); - } - // verify the required parameter 'definition_id' is set if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( @@ -360,6 +353,13 @@ public function getByIdRequest($app_id, $definition_id, $revision_id, string $co ); } + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app_id when calling getById' + ); + } + $resourcePath = '/automation/v4/actions/{appId}/{definitionId}/revisions/{revisionId}'; $formParams = []; @@ -370,14 +370,6 @@ public function getByIdRequest($app_id, $definition_id, $revision_id, string $co - // path params - if ($app_id !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), - $resourcePath - ); - } // path params if ($definition_id !== null) { $resourcePath = str_replace( @@ -394,6 +386,14 @@ public function getByIdRequest($app_id, $definition_id, $revision_id, string $co $resourcePath ); } + // path params + if ($app_id !== null) { + $resourcePath = str_replace( + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -459,19 +459,19 @@ public function getByIdRequest($app_id, $definition_id, $revision_id, string $co * * Retrieve revisions for a given definition * - * @param int $app_id The unique identifier for the app. (required) * @param string $definition_id The unique identifier for the action definition. (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int $app_id The unique identifier for the app. (required) * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionRevisionForwardPaging|\HubSpot\Client\Automation\Actions\Model\Error */ - public function getPage($app_id, $definition_id, $after = null, $limit = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($definition_id, $app_id, $limit = null, $after = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($app_id, $definition_id, $after, $limit, $contentType); + list($response) = $this->getPageWithHttpInfo($definition_id, $app_id, $limit, $after, $contentType); return $response; } @@ -480,19 +480,19 @@ public function getPage($app_id, $definition_id, $after = null, $limit = null, s * * Retrieve revisions for a given definition * - * @param int $app_id The unique identifier for the app. (required) * @param string $definition_id The unique identifier for the action definition. (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int $app_id The unique identifier for the app. (required) * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Automation\Actions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionRevisionForwardPaging|\HubSpot\Client\Automation\Actions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($app_id, $definition_id, $after = null, $limit = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($definition_id, $app_id, $limit = null, $after = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($app_id, $definition_id, $after, $limit, $contentType); + $request = $this->getPageRequest($definition_id, $app_id, $limit, $after, $contentType); try { $options = $this->createHttpClientOption(); @@ -582,18 +582,18 @@ public function getPageWithHttpInfo($app_id, $definition_id, $after = null, $lim * * Retrieve revisions for a given definition * - * @param int $app_id The unique identifier for the app. (required) * @param string $definition_id The unique identifier for the action definition. (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int $app_id The unique identifier for the app. (required) * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($app_id, $definition_id, $after = null, $limit = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($definition_id, $app_id, $limit = null, $after = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($app_id, $definition_id, $after, $limit, $contentType) + return $this->getPageAsyncWithHttpInfo($definition_id, $app_id, $limit, $after, $contentType) ->then( function ($response) { return $response[0]; @@ -606,19 +606,19 @@ function ($response) { * * Retrieve revisions for a given definition * - * @param int $app_id The unique identifier for the app. (required) * @param string $definition_id The unique identifier for the action definition. (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int $app_id The unique identifier for the app. (required) * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($app_id, $definition_id, $after = null, $limit = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($definition_id, $app_id, $limit = null, $after = null, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Automation\Actions\Model\CollectionResponsePublicActionRevisionForwardPaging'; - $request = $this->getPageRequest($app_id, $definition_id, $after, $limit, $contentType); + $request = $this->getPageRequest($definition_id, $app_id, $limit, $after, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -659,29 +659,29 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param int $app_id The unique identifier for the app. (required) * @param string $definition_id The unique identifier for the action definition. (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int $app_id The unique identifier for the app. (required) * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($app_id, $definition_id, $after = null, $limit = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($definition_id, $app_id, $limit = null, $after = null, string $contentType = self::contentTypes['getPage'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'definition_id' is set + if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getPage' + 'Missing the required parameter $definition_id when calling getPage' ); } - // verify the required parameter 'definition_id' is set - if ($definition_id === null || (is_array($definition_id) && count($definition_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $definition_id when calling getPage' + 'Missing the required parameter $app_id when calling getPage' ); } @@ -697,18 +697,18 @@ public function getPageRequest($app_id, $definition_id, $after = null, $limit = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -716,18 +716,18 @@ public function getPageRequest($app_id, $definition_id, $after = null, $limit = // path params - if ($app_id !== null) { + if ($definition_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'definitionId' . '}', + ObjectSerializer::toPathValue($definition_id), $resourcePath ); } // path params - if ($definition_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'definitionId' . '}', - ObjectSerializer::toPathValue($definition_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } diff --git a/codegen/Cms/AuditLogs/Api/BasicApi.php b/codegen/Cms/AuditLogs/Api/BasicApi.php index a9f16f7a..ceb42316 100644 --- a/codegen/Cms/AuditLogs/Api/BasicApi.php +++ b/codegen/Cms/AuditLogs/Api/BasicApi.php @@ -73,7 +73,7 @@ class BasicApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'cmsAuditLogsV3' => [ + 'getPage' => [ 'application/json', ], ]; @@ -125,48 +125,48 @@ public function getConfig() } /** - * Operation cmsAuditLogsV3 + * Operation getPage * + * @param string[]|null $user_id user_id (optional) + * @param string[]|null $event_type event_type (optional) + * @param string[]|null $object_type object_type (optional) + * @param string[]|null $object_id object_id (optional) * @param string|null $after after (optional) * @param string|null $before before (optional) - * @param string[]|null $event_type event_type (optional) * @param int|null $limit limit (optional) - * @param string[]|null $object_id object_id (optional) - * @param string[]|null $object_type object_type (optional) * @param string[]|null $sort sort (optional) - * @param string[]|null $user_id user_id (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsAuditLogsV3'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\AuditLogs\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\AuditLogs\Model\CollectionResponsePublicAuditLog|\HubSpot\Client\Cms\AuditLogs\Model\Error */ - public function cmsAuditLogsV3($after = null, $before = null, $event_type = null, $limit = null, $object_id = null, $object_type = null, $sort = null, $user_id = null, string $contentType = self::contentTypes['cmsAuditLogsV3'][0]) + public function getPage($user_id = null, $event_type = null, $object_type = null, $object_id = null, $after = null, $before = null, $limit = null, $sort = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->cmsAuditLogsV3WithHttpInfo($after, $before, $event_type, $limit, $object_id, $object_type, $sort, $user_id, $contentType); + list($response) = $this->getPageWithHttpInfo($user_id, $event_type, $object_type, $object_id, $after, $before, $limit, $sort, $contentType); return $response; } /** - * Operation cmsAuditLogsV3WithHttpInfo + * Operation getPageWithHttpInfo * + * @param string[]|null $user_id (optional) + * @param string[]|null $event_type (optional) + * @param string[]|null $object_type (optional) + * @param string[]|null $object_id (optional) * @param string|null $after (optional) * @param string|null $before (optional) - * @param string[]|null $event_type (optional) * @param int|null $limit (optional) - * @param string[]|null $object_id (optional) - * @param string[]|null $object_type (optional) * @param string[]|null $sort (optional) - * @param string[]|null $user_id (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsAuditLogsV3'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\AuditLogs\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\AuditLogs\Model\CollectionResponsePublicAuditLog|\HubSpot\Client\Cms\AuditLogs\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsAuditLogsV3WithHttpInfo($after = null, $before = null, $event_type = null, $limit = null, $object_id = null, $object_type = null, $sort = null, $user_id = null, string $contentType = self::contentTypes['cmsAuditLogsV3'][0]) + public function getPageWithHttpInfo($user_id = null, $event_type = null, $object_type = null, $object_id = null, $after = null, $before = null, $limit = null, $sort = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->cmsAuditLogsV3Request($after, $before, $event_type, $limit, $object_id, $object_type, $sort, $user_id, $contentType); + $request = $this->getPageRequest($user_id, $event_type, $object_type, $object_id, $after, $before, $limit, $sort, $contentType); try { $options = $this->createHttpClientOption(); @@ -252,24 +252,24 @@ public function cmsAuditLogsV3WithHttpInfo($after = null, $before = null, $event } /** - * Operation cmsAuditLogsV3Async + * Operation getPageAsync * + * @param string[]|null $user_id (optional) + * @param string[]|null $event_type (optional) + * @param string[]|null $object_type (optional) + * @param string[]|null $object_id (optional) * @param string|null $after (optional) * @param string|null $before (optional) - * @param string[]|null $event_type (optional) * @param int|null $limit (optional) - * @param string[]|null $object_id (optional) - * @param string[]|null $object_type (optional) * @param string[]|null $sort (optional) - * @param string[]|null $user_id (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsAuditLogsV3'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsAuditLogsV3Async($after = null, $before = null, $event_type = null, $limit = null, $object_id = null, $object_type = null, $sort = null, $user_id = null, string $contentType = self::contentTypes['cmsAuditLogsV3'][0]) + public function getPageAsync($user_id = null, $event_type = null, $object_type = null, $object_id = null, $after = null, $before = null, $limit = null, $sort = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->cmsAuditLogsV3AsyncWithHttpInfo($after, $before, $event_type, $limit, $object_id, $object_type, $sort, $user_id, $contentType) + return $this->getPageAsyncWithHttpInfo($user_id, $event_type, $object_type, $object_id, $after, $before, $limit, $sort, $contentType) ->then( function ($response) { return $response[0]; @@ -278,25 +278,25 @@ function ($response) { } /** - * Operation cmsAuditLogsV3AsyncWithHttpInfo + * Operation getPageAsyncWithHttpInfo * + * @param string[]|null $user_id (optional) + * @param string[]|null $event_type (optional) + * @param string[]|null $object_type (optional) + * @param string[]|null $object_id (optional) * @param string|null $after (optional) * @param string|null $before (optional) - * @param string[]|null $event_type (optional) * @param int|null $limit (optional) - * @param string[]|null $object_id (optional) - * @param string[]|null $object_type (optional) * @param string[]|null $sort (optional) - * @param string[]|null $user_id (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsAuditLogsV3'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsAuditLogsV3AsyncWithHttpInfo($after = null, $before = null, $event_type = null, $limit = null, $object_id = null, $object_type = null, $sort = null, $user_id = null, string $contentType = self::contentTypes['cmsAuditLogsV3'][0]) + public function getPageAsyncWithHttpInfo($user_id = null, $event_type = null, $object_type = null, $object_id = null, $after = null, $before = null, $limit = null, $sort = null, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Cms\AuditLogs\Model\CollectionResponsePublicAuditLog'; - $request = $this->cmsAuditLogsV3Request($after, $before, $event_type, $limit, $object_id, $object_type, $sort, $user_id, $contentType); + $request = $this->getPageRequest($user_id, $event_type, $object_type, $object_id, $after, $before, $limit, $sort, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -335,22 +335,22 @@ function ($exception) { } /** - * Create request for operation 'cmsAuditLogsV3' + * Create request for operation 'getPage' * + * @param string[]|null $user_id (optional) + * @param string[]|null $event_type (optional) + * @param string[]|null $object_type (optional) + * @param string[]|null $object_id (optional) * @param string|null $after (optional) * @param string|null $before (optional) - * @param string[]|null $event_type (optional) * @param int|null $limit (optional) - * @param string[]|null $object_id (optional) - * @param string[]|null $object_type (optional) * @param string[]|null $sort (optional) - * @param string[]|null $user_id (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsAuditLogsV3'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsAuditLogsV3Request($after = null, $before = null, $event_type = null, $limit = null, $object_id = null, $object_type = null, $sort = null, $user_id = null, string $contentType = self::contentTypes['cmsAuditLogsV3'][0]) + public function getPageRequest($user_id = null, $event_type = null, $object_type = null, $object_id = null, $after = null, $before = null, $limit = null, $sort = null, string $contentType = self::contentTypes['getPage'][0]) { @@ -371,26 +371,26 @@ public function cmsAuditLogsV3Request($after = null, $before = null, $event_type // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $user_id, + 'userId', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $before, - 'before', // param base name - 'string', // openApiType + $event_type, + 'eventType', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $event_type, - 'eventType', // param base name + $object_type, + 'objectType', // param base name 'array', // openApiType 'form', // style true, // explode @@ -398,44 +398,44 @@ public function cmsAuditLogsV3Request($after = null, $before = null, $event_type ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $object_id, + 'objectId', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $object_id, - 'objectId', // param base name - 'array', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $object_type, - 'objectType', // param base name - 'array', // openApiType + $before, + 'before', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $user_id, - 'userId', // param base name + $sort, + 'sort', // param base name 'array', // openApiType 'form', // style true, // explode diff --git a/codegen/Cms/Blogs/Authors/Api/BasicApi.php b/codegen/Cms/Blogs/Authors/Api/BasicApi.php index ec470305..70cea0a4 100644 --- a/codegen/Cms/Blogs/Authors/Api/BasicApi.php +++ b/codegen/Cms/Blogs/Authors/Api/BasicApi.php @@ -987,26 +987,26 @@ public function getByIdRequest($object_id, $archived = null, $property = null, s * * Get all Blog Authors * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Blog Authors created after the specified time. (optional) * @param \DateTime|null $created_at Only return Blog Authors created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Blog Authors created after the specified time. (optional) * @param \DateTime|null $created_before Only return Blog Authors created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `created`, `updated`, `createdBy`, `updatedBy`. `created` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Blog Authors last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Blog Authors last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Blog Authors last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Blog Authors last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `created`, `updated`, `createdBy`, `updatedBy`. `created` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Authors\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Blogs\Authors\Model\CollectionResponseWithTotalBlogAuthorForwardPaging|\HubSpot\Client\Cms\Blogs\Authors\Model\Error */ - public function getPage($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $response; } @@ -1015,26 +1015,26 @@ public function getPage($after = null, $archived = null, $created_after = null, * * Get all Blog Authors * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Blog Authors created after the specified time. (optional) * @param \DateTime|null $created_at Only return Blog Authors created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Blog Authors created after the specified time. (optional) * @param \DateTime|null $created_before Only return Blog Authors created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `created`, `updated`, `createdBy`, `updatedBy`. `created` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Blog Authors last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Blog Authors last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Blog Authors last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Blog Authors last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `created`, `updated`, `createdBy`, `updatedBy`. `created` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Authors\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Blogs\Authors\Model\CollectionResponseWithTotalBlogAuthorForwardPaging|\HubSpot\Client\Cms\Blogs\Authors\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); try { $options = $this->createHttpClientOption(); @@ -1124,25 +1124,25 @@ public function getPageWithHttpInfo($after = null, $archived = null, $created_af * * Get all Blog Authors * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Blog Authors created after the specified time. (optional) * @param \DateTime|null $created_at Only return Blog Authors created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Blog Authors created after the specified time. (optional) * @param \DateTime|null $created_before Only return Blog Authors created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `created`, `updated`, `createdBy`, `updatedBy`. `created` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Blog Authors last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Blog Authors last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Blog Authors last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Blog Authors last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `created`, `updated`, `createdBy`, `updatedBy`. `created` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType) ->then( function ($response) { return $response[0]; @@ -1155,26 +1155,26 @@ function ($response) { * * Get all Blog Authors * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Blog Authors created after the specified time. (optional) * @param \DateTime|null $created_at Only return Blog Authors created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Blog Authors created after the specified time. (optional) * @param \DateTime|null $created_before Only return Blog Authors created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `created`, `updated`, `createdBy`, `updatedBy`. `created` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Blog Authors last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Blog Authors last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Blog Authors last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Blog Authors last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `created`, `updated`, `createdBy`, `updatedBy`. `created` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Cms\Blogs\Authors\Model\CollectionResponseWithTotalBlogAuthorForwardPaging'; - $request = $this->getPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1215,23 +1215,23 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Blog Authors created after the specified time. (optional) * @param \DateTime|null $created_at Only return Blog Authors created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Blog Authors created after the specified time. (optional) * @param \DateTime|null $created_before Only return Blog Authors created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `created`, `updated`, `createdBy`, `updatedBy`. `created` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Blog Authors last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Blog Authors last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Blog Authors last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Blog Authors last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `created`, `updated`, `createdBy`, `updatedBy`. `created` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Blog Authors. Defaults to `false`. (optional) + * @param string|null $property Used to specify which properties of the Blog Authors to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { @@ -1255,23 +1255,14 @@ public function getPageRequest($after = null, $archived = null, $created_after = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $created_at, + 'createdAt', // param base name 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $created_after, 'createdAfter', // param base name @@ -1282,8 +1273,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name + $created_before, + 'createdBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1291,8 +1282,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name + $updated_at, + 'updatedAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1300,17 +1291,17 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $property, - 'property', // param base name + $updated_before, + 'updatedBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1327,8 +1318,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1336,17 +1327,26 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $property, + 'property', // param base name 'string', // openApiType 'form', // style true, // explode diff --git a/codegen/Cms/Blogs/BlogPosts/Api/BasicApi.php b/codegen/Cms/Blogs/BlogPosts/Api/BasicApi.php index 55213d8b..61a12479 100644 --- a/codegen/Cms/Blogs/BlogPosts/Api/BasicApi.php +++ b/codegen/Cms/Blogs/BlogPosts/Api/BasicApi.php @@ -1576,26 +1576,26 @@ public function getDraftByIdRequest($object_id, string $contentType = self::cont * * Get all posts * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return blog posts created after the specified time. (optional) * @param \DateTime|null $created_at Only return blog posts created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return blog posts created after the specified time. (optional) * @param \DateTime|null $created_before Only return blog posts created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 20. (optional) - * @param string|null $property Specific properties to return from the posts (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`. (optional) - * @param \DateTime|null $updated_after Only return blog posts last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return blog posts last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return blog posts last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return blog posts last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 20. (optional) + * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) + * @param string|null $property Specific properties to return from the posts (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\BlogPosts\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalBlogPostForwardPaging|\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error */ - public function getPage($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $response; } @@ -1604,26 +1604,26 @@ public function getPage($after = null, $archived = null, $created_after = null, * * Get all posts * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return blog posts created after the specified time. (optional) * @param \DateTime|null $created_at Only return blog posts created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return blog posts created after the specified time. (optional) * @param \DateTime|null $created_before Only return blog posts created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 20. (optional) - * @param string|null $property Specific properties to return from the posts (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`. (optional) - * @param \DateTime|null $updated_after Only return blog posts last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return blog posts last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return blog posts last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return blog posts last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 20. (optional) + * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) + * @param string|null $property Specific properties to return from the posts (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\BlogPosts\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalBlogPostForwardPaging|\HubSpot\Client\Cms\Blogs\BlogPosts\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); try { $options = $this->createHttpClientOption(); @@ -1713,25 +1713,25 @@ public function getPageWithHttpInfo($after = null, $archived = null, $created_af * * Get all posts * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return blog posts created after the specified time. (optional) * @param \DateTime|null $created_at Only return blog posts created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return blog posts created after the specified time. (optional) * @param \DateTime|null $created_before Only return blog posts created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 20. (optional) - * @param string|null $property Specific properties to return from the posts (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`. (optional) - * @param \DateTime|null $updated_after Only return blog posts last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return blog posts last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return blog posts last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return blog posts last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 20. (optional) + * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) + * @param string|null $property Specific properties to return from the posts (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType) ->then( function ($response) { return $response[0]; @@ -1744,26 +1744,26 @@ function ($response) { * * Get all posts * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return blog posts created after the specified time. (optional) * @param \DateTime|null $created_at Only return blog posts created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return blog posts created after the specified time. (optional) * @param \DateTime|null $created_before Only return blog posts created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 20. (optional) - * @param string|null $property Specific properties to return from the posts (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`. (optional) - * @param \DateTime|null $updated_after Only return blog posts last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return blog posts last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return blog posts last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return blog posts last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 20. (optional) + * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) + * @param string|null $property Specific properties to return from the posts (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Cms\Blogs\BlogPosts\Model\CollectionResponseWithTotalBlogPostForwardPaging'; - $request = $this->getPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1804,23 +1804,23 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return blog posts created after the specified time. (optional) * @param \DateTime|null $created_at Only return blog posts created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return blog posts created after the specified time. (optional) * @param \DateTime|null $created_before Only return blog posts created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 20. (optional) - * @param string|null $property Specific properties to return from the posts (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`. (optional) - * @param \DateTime|null $updated_after Only return blog posts last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return blog posts last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return blog posts last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return blog posts last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `createdAt` (default), `name`, `updatedAt`, `createdBy`, `updatedBy`. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 20. (optional) + * @param bool|null $archived Specifies whether to return deleted blog posts. Defaults to `false`. (optional) + * @param string|null $property Specific properties to return from the posts (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { @@ -1844,23 +1844,14 @@ public function getPageRequest($after = null, $archived = null, $created_after = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $created_at, + 'createdAt', // param base name 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $created_after, 'createdAfter', // param base name @@ -1871,8 +1862,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name + $created_before, + 'createdBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1880,8 +1871,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name + $updated_at, + 'updatedAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1889,17 +1880,17 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $property, - 'property', // param base name + $updated_before, + 'updatedBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1916,8 +1907,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1925,17 +1916,26 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $property, + 'property', // param base name 'string', // openApiType 'form', // style true, // explode diff --git a/codegen/Cms/Blogs/Tags/Api/BasicApi.php b/codegen/Cms/Blogs/Tags/Api/BasicApi.php index 7e13ee1e..c0101bbf 100644 --- a/codegen/Cms/Blogs/Tags/Api/BasicApi.php +++ b/codegen/Cms/Blogs/Tags/Api/BasicApi.php @@ -987,26 +987,26 @@ public function getByIdRequest($object_id, $archived = null, $property = null, s * * Get all Blog Tags * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Blog Tags created after the specified time. (optional) * @param \DateTime|null $created_at Only return Blog Tags created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Blog Tags created after the specified time. (optional) * @param \DateTime|null $created_before Only return Blog Tags created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Blog Tags last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Blog Tags last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Blog Tags last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Blog Tags last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Tags\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Blogs\Tags\Model\CollectionResponseWithTotalTagForwardPaging|\HubSpot\Client\Cms\Blogs\Tags\Model\Error */ - public function getPage($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $response; } @@ -1015,26 +1015,26 @@ public function getPage($after = null, $archived = null, $created_after = null, * * Get all Blog Tags * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Blog Tags created after the specified time. (optional) * @param \DateTime|null $created_at Only return Blog Tags created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Blog Tags created after the specified time. (optional) * @param \DateTime|null $created_before Only return Blog Tags created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Blog Tags last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Blog Tags last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Blog Tags last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Blog Tags last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Blogs\Tags\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Blogs\Tags\Model\CollectionResponseWithTotalTagForwardPaging|\HubSpot\Client\Cms\Blogs\Tags\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); try { $options = $this->createHttpClientOption(); @@ -1124,25 +1124,25 @@ public function getPageWithHttpInfo($after = null, $archived = null, $created_af * * Get all Blog Tags * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Blog Tags created after the specified time. (optional) * @param \DateTime|null $created_at Only return Blog Tags created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Blog Tags created after the specified time. (optional) * @param \DateTime|null $created_before Only return Blog Tags created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Blog Tags last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Blog Tags last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Blog Tags last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Blog Tags last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType) ->then( function ($response) { return $response[0]; @@ -1155,26 +1155,26 @@ function ($response) { * * Get all Blog Tags * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Blog Tags created after the specified time. (optional) * @param \DateTime|null $created_at Only return Blog Tags created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Blog Tags created after the specified time. (optional) * @param \DateTime|null $created_before Only return Blog Tags created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Blog Tags last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Blog Tags last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Blog Tags last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Blog Tags last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Cms\Blogs\Tags\Model\CollectionResponseWithTotalTagForwardPaging'; - $request = $this->getPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1215,23 +1215,23 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Blog Tags created after the specified time. (optional) * @param \DateTime|null $created_at Only return Blog Tags created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Blog Tags created after the specified time. (optional) * @param \DateTime|null $created_before Only return Blog Tags created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Blog Tags last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Blog Tags last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Blog Tags last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Blog Tags last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Blog Tags. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the Blog Tag to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { @@ -1255,23 +1255,14 @@ public function getPageRequest($after = null, $archived = null, $created_after = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $created_at, + 'createdAt', // param base name 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $created_after, 'createdAfter', // param base name @@ -1282,8 +1273,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name + $created_before, + 'createdBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1291,8 +1282,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name + $updated_at, + 'updatedAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1300,17 +1291,17 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $property, - 'property', // param base name + $updated_before, + 'updatedBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1327,8 +1318,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1336,17 +1327,26 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $property, + 'property', // param base name 'string', // openApiType 'form', // style true, // explode diff --git a/codegen/Cms/Domains/Api/BasicApi.php b/codegen/Cms/Domains/Api/BasicApi.php index e3cd5f90..37db1f43 100644 --- a/codegen/Cms/Domains/Api/BasicApi.php +++ b/codegen/Cms/Domains/Api/BasicApi.php @@ -73,10 +73,10 @@ class BasicApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'cmsV3Domains' => [ + 'getById' => [ 'application/json', ], - 'getById' => [ + 'getPage' => [ 'application/json', ], ]; @@ -128,52 +128,38 @@ public function getConfig() } /** - * Operation cmsV3Domains + * Operation getById * - * @param string|null $after after (optional) - * @param bool|null $archived archived (optional) - * @param \DateTime|null $created_after created_after (optional) - * @param \DateTime|null $created_at created_at (optional) - * @param \DateTime|null $created_before created_before (optional) - * @param int|null $limit limit (optional) - * @param string[]|null $sort sort (optional) - * @param \DateTime|null $updated_after updated_after (optional) - * @param \DateTime|null $updated_at updated_at (optional) - * @param \DateTime|null $updated_before updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsV3Domains'] to see the possible values for this operation + * Get a single domain + * + * @param string $domain_id The unique ID of the domain. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Domains\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain|\HubSpot\Client\Cms\Domains\Model\Error + * @return \HubSpot\Client\Cms\Domains\Model\Domain|\HubSpot\Client\Cms\Domains\Model\Error */ - public function cmsV3Domains($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsV3Domains'][0]) + public function getById($domain_id, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->cmsV3DomainsWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getByIdWithHttpInfo($domain_id, $contentType); return $response; } /** - * Operation cmsV3DomainsWithHttpInfo + * Operation getByIdWithHttpInfo * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsV3Domains'] to see the possible values for this operation + * Get a single domain + * + * @param string $domain_id The unique ID of the domain. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Domains\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain|\HubSpot\Client\Cms\Domains\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Cms\Domains\Model\Domain|\HubSpot\Client\Cms\Domains\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsV3DomainsWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsV3Domains'][0]) + public function getByIdWithHttpInfo($domain_id, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->cmsV3DomainsRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getByIdRequest($domain_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -201,7 +187,7 @@ public function cmsV3DomainsWithHttpInfo($after = null, $archived = null, $creat switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain', + '\HubSpot\Client\Cms\Domains\Model\Domain', $request, $response, ); @@ -229,7 +215,7 @@ public function cmsV3DomainsWithHttpInfo($after = null, $archived = null, $creat } return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain', + '\HubSpot\Client\Cms\Domains\Model\Domain', $request, $response, ); @@ -238,7 +224,7 @@ public function cmsV3DomainsWithHttpInfo($after = null, $archived = null, $creat case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain', + '\HubSpot\Client\Cms\Domains\Model\Domain', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -259,26 +245,19 @@ public function cmsV3DomainsWithHttpInfo($after = null, $archived = null, $creat } /** - * Operation cmsV3DomainsAsync + * Operation getByIdAsync * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsV3Domains'] to see the possible values for this operation + * Get a single domain + * + * @param string $domain_id The unique ID of the domain. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsV3DomainsAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsV3Domains'][0]) + public function getByIdAsync($domain_id, string $contentType = self::contentTypes['getById'][0]) { - return $this->cmsV3DomainsAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getByIdAsyncWithHttpInfo($domain_id, $contentType) ->then( function ($response) { return $response[0]; @@ -287,27 +266,20 @@ function ($response) { } /** - * Operation cmsV3DomainsAsyncWithHttpInfo + * Operation getByIdAsyncWithHttpInfo * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsV3Domains'] to see the possible values for this operation + * Get a single domain + * + * @param string $domain_id The unique ID of the domain. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsV3DomainsAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsV3Domains'][0]) + public function getByIdAsyncWithHttpInfo($domain_id, string $contentType = self::contentTypes['getById'][0]) { - $returnType = '\HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain'; - $request = $this->cmsV3DomainsRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $returnType = '\HubSpot\Client\Cms\Domains\Model\Domain'; + $request = $this->getByIdRequest($domain_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -346,136 +318,42 @@ function ($exception) { } /** - * Create request for operation 'cmsV3Domains' + * Create request for operation 'getById' * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsV3Domains'] to see the possible values for this operation + * @param string $domain_id The unique ID of the domain. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsV3DomainsRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsV3Domains'][0]) + public function getByIdRequest($domain_id, string $contentType = self::contentTypes['getById'][0]) { + // verify the required parameter 'domain_id' is set + if ($domain_id === null || (is_array($domain_id) && count($domain_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $domain_id when calling getById' + ); + } - - - - - - - - - - $resourcePath = '/cms/v3/domains'; + $resourcePath = '/cms/v3/domains/{domainId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_after, - 'createdAfter', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($domain_id !== null) { + $resourcePath = str_replace( + '{' . 'domainId' . '}', + ObjectSerializer::toPathValue($domain_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -536,38 +414,52 @@ public function cmsV3DomainsRequest($after = null, $archived = null, $created_af } /** - * Operation getById - * - * Get a single domain + * Operation getPage * - * @param string $domain_id The unique ID of the domain. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \DateTime|null $created_at created_at (optional) + * @param \DateTime|null $created_after created_after (optional) + * @param \DateTime|null $created_before created_before (optional) + * @param \DateTime|null $updated_at updated_at (optional) + * @param \DateTime|null $updated_after updated_after (optional) + * @param \DateTime|null $updated_before updated_before (optional) + * @param string[]|null $sort sort (optional) + * @param string|null $after after (optional) + * @param int|null $limit limit (optional) + * @param bool|null $archived archived (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Domains\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Cms\Domains\Model\Domain|\HubSpot\Client\Cms\Domains\Model\Error + * @return \HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain|\HubSpot\Client\Cms\Domains\Model\Error */ - public function getById($domain_id, string $contentType = self::contentTypes['getById'][0]) + public function getPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getByIdWithHttpInfo($domain_id, $contentType); + list($response) = $this->getPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $contentType); return $response; } /** - * Operation getByIdWithHttpInfo + * Operation getPageWithHttpInfo * - * Get a single domain - * - * @param string $domain_id The unique ID of the domain. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Domains\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Cms\Domains\Model\Domain|\HubSpot\Client\Cms\Domains\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain|\HubSpot\Client\Cms\Domains\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($domain_id, string $contentType = self::contentTypes['getById'][0]) + public function getPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getByIdRequest($domain_id, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -595,7 +487,7 @@ public function getByIdWithHttpInfo($domain_id, string $contentType = self::cont switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\Domains\Model\Domain', + '\HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain', $request, $response, ); @@ -623,7 +515,7 @@ public function getByIdWithHttpInfo($domain_id, string $contentType = self::cont } return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\Domains\Model\Domain', + '\HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain', $request, $response, ); @@ -632,7 +524,7 @@ public function getByIdWithHttpInfo($domain_id, string $contentType = self::cont case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Cms\Domains\Model\Domain', + '\HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -653,19 +545,26 @@ public function getByIdWithHttpInfo($domain_id, string $contentType = self::cont } /** - * Operation getByIdAsync + * Operation getPageAsync * - * Get a single domain - * - * @param string $domain_id The unique ID of the domain. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($domain_id, string $contentType = self::contentTypes['getById'][0]) + public function getPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getByIdAsyncWithHttpInfo($domain_id, $contentType) + return $this->getPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -674,20 +573,27 @@ function ($response) { } /** - * Operation getByIdAsyncWithHttpInfo + * Operation getPageAsyncWithHttpInfo * - * Get a single domain - * - * @param string $domain_id The unique ID of the domain. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($domain_id, string $contentType = self::contentTypes['getById'][0]) + public function getPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) { - $returnType = '\HubSpot\Client\Cms\Domains\Model\Domain'; - $request = $this->getByIdRequest($domain_id, $contentType); + $returnType = '\HubSpot\Client\Cms\Domains\Model\CollectionResponseWithTotalDomain'; + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -726,42 +632,136 @@ function ($exception) { } /** - * Create request for operation 'getById' + * Create request for operation 'getPage' * - * @param string $domain_id The unique ID of the domain. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($domain_id, string $contentType = self::contentTypes['getById'][0]) + public function getPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) { - // verify the required parameter 'domain_id' is set - if ($domain_id === null || (is_array($domain_id) && count($domain_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $domain_id when calling getById' - ); - } - $resourcePath = '/cms/v3/domains/{domainId}'; + + + + + + + + + + $resourcePath = '/cms/v3/domains'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_at, + 'createdAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_after, + 'createdAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_before, + 'createdBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_at, + 'updatedAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_before, + 'updatedBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sort, + 'sort', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - // path params - if ($domain_id !== null) { - $resourcePath = str_replace( - '{' . 'domainId' . '}', - ObjectSerializer::toPathValue($domain_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( diff --git a/codegen/Cms/Hubdb/Api/RowsApi.php b/codegen/Cms/Hubdb/Api/RowsApi.php index 133f1b13..c3723bba 100644 --- a/codegen/Cms/Hubdb/Api/RowsApi.php +++ b/codegen/Cms/Hubdb/Api/RowsApi.php @@ -171,8 +171,8 @@ public function getConfig() * * Clone a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param string|null $name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cloneDraftTableRow'] to see the possible values for this operation * @@ -180,9 +180,9 @@ public function getConfig() * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function cloneDraftTableRow($row_id, $table_id_or_name, $name = null, string $contentType = self::contentTypes['cloneDraftTableRow'][0]) + public function cloneDraftTableRow($table_id_or_name, $row_id, $name = null, string $contentType = self::contentTypes['cloneDraftTableRow'][0]) { - list($response) = $this->cloneDraftTableRowWithHttpInfo($row_id, $table_id_or_name, $name, $contentType); + list($response) = $this->cloneDraftTableRowWithHttpInfo($table_id_or_name, $row_id, $name, $contentType); return $response; } @@ -191,8 +191,8 @@ public function cloneDraftTableRow($row_id, $table_id_or_name, $name = null, str * * Clone a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param string|null $name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cloneDraftTableRow'] to see the possible values for this operation * @@ -200,9 +200,9 @@ public function cloneDraftTableRow($row_id, $table_id_or_name, $name = null, str * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cloneDraftTableRowWithHttpInfo($row_id, $table_id_or_name, $name = null, string $contentType = self::contentTypes['cloneDraftTableRow'][0]) + public function cloneDraftTableRowWithHttpInfo($table_id_or_name, $row_id, $name = null, string $contentType = self::contentTypes['cloneDraftTableRow'][0]) { - $request = $this->cloneDraftTableRowRequest($row_id, $table_id_or_name, $name, $contentType); + $request = $this->cloneDraftTableRowRequest($table_id_or_name, $row_id, $name, $contentType); try { $options = $this->createHttpClientOption(); @@ -292,17 +292,17 @@ public function cloneDraftTableRowWithHttpInfo($row_id, $table_id_or_name, $name * * Clone a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param string|null $name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cloneDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cloneDraftTableRowAsync($row_id, $table_id_or_name, $name = null, string $contentType = self::contentTypes['cloneDraftTableRow'][0]) + public function cloneDraftTableRowAsync($table_id_or_name, $row_id, $name = null, string $contentType = self::contentTypes['cloneDraftTableRow'][0]) { - return $this->cloneDraftTableRowAsyncWithHttpInfo($row_id, $table_id_or_name, $name, $contentType) + return $this->cloneDraftTableRowAsyncWithHttpInfo($table_id_or_name, $row_id, $name, $contentType) ->then( function ($response) { return $response[0]; @@ -315,18 +315,18 @@ function ($response) { * * Clone a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param string|null $name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cloneDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cloneDraftTableRowAsyncWithHttpInfo($row_id, $table_id_or_name, $name = null, string $contentType = self::contentTypes['cloneDraftTableRow'][0]) + public function cloneDraftTableRowAsyncWithHttpInfo($table_id_or_name, $row_id, $name = null, string $contentType = self::contentTypes['cloneDraftTableRow'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3'; - $request = $this->cloneDraftTableRowRequest($row_id, $table_id_or_name, $name, $contentType); + $request = $this->cloneDraftTableRowRequest($table_id_or_name, $row_id, $name, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -367,17 +367,24 @@ function ($exception) { /** * Create request for operation 'cloneDraftTableRow' * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param string|null $name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cloneDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cloneDraftTableRowRequest($row_id, $table_id_or_name, $name = null, string $contentType = self::contentTypes['cloneDraftTableRow'][0]) + public function cloneDraftTableRowRequest($table_id_or_name, $row_id, $name = null, string $contentType = self::contentTypes['cloneDraftTableRow'][0]) { + // verify the required parameter 'table_id_or_name' is set + if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $table_id_or_name when calling cloneDraftTableRow' + ); + } + // verify the required parameter 'row_id' is set if ($row_id === null || (is_array($row_id) && count($row_id) === 0)) { throw new \InvalidArgumentException( @@ -388,13 +395,6 @@ public function cloneDraftTableRowRequest($row_id, $table_id_or_name, $name = nu throw new \InvalidArgumentException("invalid value for \"row_id\" when calling RowsApi.cloneDraftTableRow, must conform to the pattern /\\d+/."); } - // verify the required parameter 'table_id_or_name' is set - if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $table_id_or_name when calling cloneDraftTableRow' - ); - } - $resourcePath = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft/clone'; @@ -416,18 +416,18 @@ public function cloneDraftTableRowRequest($row_id, $table_id_or_name, $name = nu // path params - if ($row_id !== null) { + if ($table_id_or_name !== null) { $resourcePath = str_replace( - '{' . 'rowId' . '}', - ObjectSerializer::toPathValue($row_id), + '{' . 'tableIdOrName' . '}', + ObjectSerializer::toPathValue($table_id_or_name), $resourcePath ); } // path params - if ($table_id_or_name !== null) { + if ($row_id !== null) { $resourcePath = str_replace( - '{' . 'tableIdOrName' . '}', - ObjectSerializer::toPathValue($table_id_or_name), + '{' . 'rowId' . '}', + ObjectSerializer::toPathValue($row_id), $resourcePath ); } @@ -1424,8 +1424,8 @@ public function createTableRowRequest($table_id_or_name, $hub_db_table_row_v3_re * * Get a row from the draft table * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDraftTableRowById'] to see the possible values for this operation * @@ -1433,9 +1433,9 @@ public function createTableRowRequest($table_id_or_name, $hub_db_table_row_v3_re * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function getDraftTableRowById($row_id, $table_id_or_name, $archived = null, string $contentType = self::contentTypes['getDraftTableRowById'][0]) + public function getDraftTableRowById($table_id_or_name, $row_id, $archived = null, string $contentType = self::contentTypes['getDraftTableRowById'][0]) { - list($response) = $this->getDraftTableRowByIdWithHttpInfo($row_id, $table_id_or_name, $archived, $contentType); + list($response) = $this->getDraftTableRowByIdWithHttpInfo($table_id_or_name, $row_id, $archived, $contentType); return $response; } @@ -1444,8 +1444,8 @@ public function getDraftTableRowById($row_id, $table_id_or_name, $archived = nul * * Get a row from the draft table * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDraftTableRowById'] to see the possible values for this operation * @@ -1453,9 +1453,9 @@ public function getDraftTableRowById($row_id, $table_id_or_name, $archived = nul * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getDraftTableRowByIdWithHttpInfo($row_id, $table_id_or_name, $archived = null, string $contentType = self::contentTypes['getDraftTableRowById'][0]) + public function getDraftTableRowByIdWithHttpInfo($table_id_or_name, $row_id, $archived = null, string $contentType = self::contentTypes['getDraftTableRowById'][0]) { - $request = $this->getDraftTableRowByIdRequest($row_id, $table_id_or_name, $archived, $contentType); + $request = $this->getDraftTableRowByIdRequest($table_id_or_name, $row_id, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1545,17 +1545,17 @@ public function getDraftTableRowByIdWithHttpInfo($row_id, $table_id_or_name, $ar * * Get a row from the draft table * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDraftTableRowById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDraftTableRowByIdAsync($row_id, $table_id_or_name, $archived = null, string $contentType = self::contentTypes['getDraftTableRowById'][0]) + public function getDraftTableRowByIdAsync($table_id_or_name, $row_id, $archived = null, string $contentType = self::contentTypes['getDraftTableRowById'][0]) { - return $this->getDraftTableRowByIdAsyncWithHttpInfo($row_id, $table_id_or_name, $archived, $contentType) + return $this->getDraftTableRowByIdAsyncWithHttpInfo($table_id_or_name, $row_id, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1568,18 +1568,18 @@ function ($response) { * * Get a row from the draft table * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDraftTableRowById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDraftTableRowByIdAsyncWithHttpInfo($row_id, $table_id_or_name, $archived = null, string $contentType = self::contentTypes['getDraftTableRowById'][0]) + public function getDraftTableRowByIdAsyncWithHttpInfo($table_id_or_name, $row_id, $archived = null, string $contentType = self::contentTypes['getDraftTableRowById'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3'; - $request = $this->getDraftTableRowByIdRequest($row_id, $table_id_or_name, $archived, $contentType); + $request = $this->getDraftTableRowByIdRequest($table_id_or_name, $row_id, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1620,17 +1620,24 @@ function ($exception) { /** * Create request for operation 'getDraftTableRowById' * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDraftTableRowById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getDraftTableRowByIdRequest($row_id, $table_id_or_name, $archived = null, string $contentType = self::contentTypes['getDraftTableRowById'][0]) + public function getDraftTableRowByIdRequest($table_id_or_name, $row_id, $archived = null, string $contentType = self::contentTypes['getDraftTableRowById'][0]) { + // verify the required parameter 'table_id_or_name' is set + if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $table_id_or_name when calling getDraftTableRowById' + ); + } + // verify the required parameter 'row_id' is set if ($row_id === null || (is_array($row_id) && count($row_id) === 0)) { throw new \InvalidArgumentException( @@ -1641,13 +1648,6 @@ public function getDraftTableRowByIdRequest($row_id, $table_id_or_name, $archive throw new \InvalidArgumentException("invalid value for \"row_id\" when calling RowsApi.getDraftTableRowById, must conform to the pattern /\\d+/."); } - // verify the required parameter 'table_id_or_name' is set - if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $table_id_or_name when calling getDraftTableRowById' - ); - } - $resourcePath = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft'; @@ -1669,18 +1669,18 @@ public function getDraftTableRowByIdRequest($row_id, $table_id_or_name, $archive // path params - if ($row_id !== null) { + if ($table_id_or_name !== null) { $resourcePath = str_replace( - '{' . 'rowId' . '}', - ObjectSerializer::toPathValue($row_id), + '{' . 'tableIdOrName' . '}', + ObjectSerializer::toPathValue($table_id_or_name), $resourcePath ); } // path params - if ($table_id_or_name !== null) { + if ($row_id !== null) { $resourcePath = str_replace( - '{' . 'tableIdOrName' . '}', - ObjectSerializer::toPathValue($table_id_or_name), + '{' . 'rowId' . '}', + ObjectSerializer::toPathValue($row_id), $resourcePath ); } @@ -1748,8 +1748,8 @@ public function getDraftTableRowByIdRequest($row_id, $table_id_or_name, $archive * * Get a table row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableRow'] to see the possible values for this operation * @@ -1757,9 +1757,9 @@ public function getDraftTableRowByIdRequest($row_id, $table_id_or_name, $archive * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function getTableRow($row_id, $table_id_or_name, $archived = null, string $contentType = self::contentTypes['getTableRow'][0]) + public function getTableRow($table_id_or_name, $row_id, $archived = null, string $contentType = self::contentTypes['getTableRow'][0]) { - list($response) = $this->getTableRowWithHttpInfo($row_id, $table_id_or_name, $archived, $contentType); + list($response) = $this->getTableRowWithHttpInfo($table_id_or_name, $row_id, $archived, $contentType); return $response; } @@ -1768,8 +1768,8 @@ public function getTableRow($row_id, $table_id_or_name, $archived = null, string * * Get a table row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableRow'] to see the possible values for this operation * @@ -1777,9 +1777,9 @@ public function getTableRow($row_id, $table_id_or_name, $archived = null, string * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getTableRowWithHttpInfo($row_id, $table_id_or_name, $archived = null, string $contentType = self::contentTypes['getTableRow'][0]) + public function getTableRowWithHttpInfo($table_id_or_name, $row_id, $archived = null, string $contentType = self::contentTypes['getTableRow'][0]) { - $request = $this->getTableRowRequest($row_id, $table_id_or_name, $archived, $contentType); + $request = $this->getTableRowRequest($table_id_or_name, $row_id, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1869,17 +1869,17 @@ public function getTableRowWithHttpInfo($row_id, $table_id_or_name, $archived = * * Get a table row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTableRowAsync($row_id, $table_id_or_name, $archived = null, string $contentType = self::contentTypes['getTableRow'][0]) + public function getTableRowAsync($table_id_or_name, $row_id, $archived = null, string $contentType = self::contentTypes['getTableRow'][0]) { - return $this->getTableRowAsyncWithHttpInfo($row_id, $table_id_or_name, $archived, $contentType) + return $this->getTableRowAsyncWithHttpInfo($table_id_or_name, $row_id, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1892,18 +1892,18 @@ function ($response) { * * Get a table row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTableRowAsyncWithHttpInfo($row_id, $table_id_or_name, $archived = null, string $contentType = self::contentTypes['getTableRow'][0]) + public function getTableRowAsyncWithHttpInfo($table_id_or_name, $row_id, $archived = null, string $contentType = self::contentTypes['getTableRow'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3'; - $request = $this->getTableRowRequest($row_id, $table_id_or_name, $archived, $contentType); + $request = $this->getTableRowRequest($table_id_or_name, $row_id, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1944,17 +1944,24 @@ function ($exception) { /** * Create request for operation 'getTableRow' * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTableRowRequest($row_id, $table_id_or_name, $archived = null, string $contentType = self::contentTypes['getTableRow'][0]) + public function getTableRowRequest($table_id_or_name, $row_id, $archived = null, string $contentType = self::contentTypes['getTableRow'][0]) { + // verify the required parameter 'table_id_or_name' is set + if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $table_id_or_name when calling getTableRow' + ); + } + // verify the required parameter 'row_id' is set if ($row_id === null || (is_array($row_id) && count($row_id) === 0)) { throw new \InvalidArgumentException( @@ -1965,13 +1972,6 @@ public function getTableRowRequest($row_id, $table_id_or_name, $archived = null, throw new \InvalidArgumentException("invalid value for \"row_id\" when calling RowsApi.getTableRow, must conform to the pattern /\\d+/."); } - // verify the required parameter 'table_id_or_name' is set - if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $table_id_or_name when calling getTableRow' - ); - } - $resourcePath = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}'; @@ -1993,18 +1993,18 @@ public function getTableRowRequest($row_id, $table_id_or_name, $archived = null, // path params - if ($row_id !== null) { + if ($table_id_or_name !== null) { $resourcePath = str_replace( - '{' . 'rowId' . '}', - ObjectSerializer::toPathValue($row_id), + '{' . 'tableIdOrName' . '}', + ObjectSerializer::toPathValue($table_id_or_name), $resourcePath ); } // path params - if ($table_id_or_name !== null) { + if ($row_id !== null) { $resourcePath = str_replace( - '{' . 'tableIdOrName' . '}', - ObjectSerializer::toPathValue($table_id_or_name), + '{' . 'rowId' . '}', + ObjectSerializer::toPathValue($row_id), $resourcePath ); } @@ -2073,21 +2073,21 @@ public function getTableRowRequest($row_id, $table_id_or_name, $archived = null, * Get rows for a table * * @param string $table_id_or_name (required) + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $offset (optional) * @param string[]|null $properties (optional) - * @param string[]|null $sort (optional) + * @param int|null $offset (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableRows'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function getTableRows($table_id_or_name, $after = null, $archived = null, $limit = null, $offset = null, $properties = null, $sort = null, string $contentType = self::contentTypes['getTableRows'][0]) + public function getTableRows($table_id_or_name, $sort = null, $after = null, $limit = null, $properties = null, $offset = null, $archived = null, string $contentType = self::contentTypes['getTableRows'][0]) { - list($response) = $this->getTableRowsWithHttpInfo($table_id_or_name, $after, $archived, $limit, $offset, $properties, $sort, $contentType); + list($response) = $this->getTableRowsWithHttpInfo($table_id_or_name, $sort, $after, $limit, $properties, $offset, $archived, $contentType); return $response; } @@ -2097,21 +2097,21 @@ public function getTableRows($table_id_or_name, $after = null, $archived = null, * Get rows for a table * * @param string $table_id_or_name (required) + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $offset (optional) * @param string[]|null $properties (optional) - * @param string[]|null $sort (optional) + * @param int|null $offset (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableRows'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getTableRowsWithHttpInfo($table_id_or_name, $after = null, $archived = null, $limit = null, $offset = null, $properties = null, $sort = null, string $contentType = self::contentTypes['getTableRows'][0]) + public function getTableRowsWithHttpInfo($table_id_or_name, $sort = null, $after = null, $limit = null, $properties = null, $offset = null, $archived = null, string $contentType = self::contentTypes['getTableRows'][0]) { - $request = $this->getTableRowsRequest($table_id_or_name, $after, $archived, $limit, $offset, $properties, $sort, $contentType); + $request = $this->getTableRowsRequest($table_id_or_name, $sort, $after, $limit, $properties, $offset, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -2202,20 +2202,20 @@ public function getTableRowsWithHttpInfo($table_id_or_name, $after = null, $arch * Get rows for a table * * @param string $table_id_or_name (required) + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $offset (optional) * @param string[]|null $properties (optional) - * @param string[]|null $sort (optional) + * @param int|null $offset (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableRows'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTableRowsAsync($table_id_or_name, $after = null, $archived = null, $limit = null, $offset = null, $properties = null, $sort = null, string $contentType = self::contentTypes['getTableRows'][0]) + public function getTableRowsAsync($table_id_or_name, $sort = null, $after = null, $limit = null, $properties = null, $offset = null, $archived = null, string $contentType = self::contentTypes['getTableRows'][0]) { - return $this->getTableRowsAsyncWithHttpInfo($table_id_or_name, $after, $archived, $limit, $offset, $properties, $sort, $contentType) + return $this->getTableRowsAsyncWithHttpInfo($table_id_or_name, $sort, $after, $limit, $properties, $offset, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -2229,21 +2229,21 @@ function ($response) { * Get rows for a table * * @param string $table_id_or_name (required) + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $offset (optional) * @param string[]|null $properties (optional) - * @param string[]|null $sort (optional) + * @param int|null $offset (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableRows'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTableRowsAsyncWithHttpInfo($table_id_or_name, $after = null, $archived = null, $limit = null, $offset = null, $properties = null, $sort = null, string $contentType = self::contentTypes['getTableRows'][0]) + public function getTableRowsAsyncWithHttpInfo($table_id_or_name, $sort = null, $after = null, $limit = null, $properties = null, $offset = null, $archived = null, string $contentType = self::contentTypes['getTableRows'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3'; - $request = $this->getTableRowsRequest($table_id_or_name, $after, $archived, $limit, $offset, $properties, $sort, $contentType); + $request = $this->getTableRowsRequest($table_id_or_name, $sort, $after, $limit, $properties, $offset, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2285,18 +2285,18 @@ function ($exception) { * Create request for operation 'getTableRows' * * @param string $table_id_or_name (required) + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $offset (optional) * @param string[]|null $properties (optional) - * @param string[]|null $sort (optional) + * @param int|null $offset (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableRows'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTableRowsRequest($table_id_or_name, $after = null, $archived = null, $limit = null, $offset = null, $properties = null, $sort = null, string $contentType = self::contentTypes['getTableRows'][0]) + public function getTableRowsRequest($table_id_or_name, $sort = null, $after = null, $limit = null, $properties = null, $offset = null, $archived = null, string $contentType = self::contentTypes['getTableRows'][0]) { // verify the required parameter 'table_id_or_name' is set @@ -2322,18 +2322,18 @@ public function getTableRowsRequest($table_id_or_name, $after = null, $archived // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $sort, + 'sort', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -2349,27 +2349,27 @@ public function getTableRowsRequest($table_id_or_name, $after = null, $archived ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $offset, - 'offset', // param base name - 'integer', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $offset, + 'offset', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required @@ -2448,17 +2448,17 @@ public function getTableRowsRequest($table_id_or_name, $after = null, $archived * * Permanently deletes a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['purgeDraftTableRow'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function purgeDraftTableRow($row_id, $table_id_or_name, string $contentType = self::contentTypes['purgeDraftTableRow'][0]) + public function purgeDraftTableRow($table_id_or_name, $row_id, string $contentType = self::contentTypes['purgeDraftTableRow'][0]) { - $this->purgeDraftTableRowWithHttpInfo($row_id, $table_id_or_name, $contentType); + $this->purgeDraftTableRowWithHttpInfo($table_id_or_name, $row_id, $contentType); } /** @@ -2466,17 +2466,17 @@ public function purgeDraftTableRow($row_id, $table_id_or_name, string $contentTy * * Permanently deletes a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['purgeDraftTableRow'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function purgeDraftTableRowWithHttpInfo($row_id, $table_id_or_name, string $contentType = self::contentTypes['purgeDraftTableRow'][0]) + public function purgeDraftTableRowWithHttpInfo($table_id_or_name, $row_id, string $contentType = self::contentTypes['purgeDraftTableRow'][0]) { - $request = $this->purgeDraftTableRowRequest($row_id, $table_id_or_name, $contentType); + $request = $this->purgeDraftTableRowRequest($table_id_or_name, $row_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2524,16 +2524,16 @@ public function purgeDraftTableRowWithHttpInfo($row_id, $table_id_or_name, strin * * Permanently deletes a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['purgeDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function purgeDraftTableRowAsync($row_id, $table_id_or_name, string $contentType = self::contentTypes['purgeDraftTableRow'][0]) + public function purgeDraftTableRowAsync($table_id_or_name, $row_id, string $contentType = self::contentTypes['purgeDraftTableRow'][0]) { - return $this->purgeDraftTableRowAsyncWithHttpInfo($row_id, $table_id_or_name, $contentType) + return $this->purgeDraftTableRowAsyncWithHttpInfo($table_id_or_name, $row_id, $contentType) ->then( function ($response) { return $response[0]; @@ -2546,17 +2546,17 @@ function ($response) { * * Permanently deletes a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['purgeDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function purgeDraftTableRowAsyncWithHttpInfo($row_id, $table_id_or_name, string $contentType = self::contentTypes['purgeDraftTableRow'][0]) + public function purgeDraftTableRowAsyncWithHttpInfo($table_id_or_name, $row_id, string $contentType = self::contentTypes['purgeDraftTableRow'][0]) { $returnType = ''; - $request = $this->purgeDraftTableRowRequest($row_id, $table_id_or_name, $contentType); + $request = $this->purgeDraftTableRowRequest($table_id_or_name, $row_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2584,16 +2584,23 @@ function ($exception) { /** * Create request for operation 'purgeDraftTableRow' * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['purgeDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function purgeDraftTableRowRequest($row_id, $table_id_or_name, string $contentType = self::contentTypes['purgeDraftTableRow'][0]) + public function purgeDraftTableRowRequest($table_id_or_name, $row_id, string $contentType = self::contentTypes['purgeDraftTableRow'][0]) { + // verify the required parameter 'table_id_or_name' is set + if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $table_id_or_name when calling purgeDraftTableRow' + ); + } + // verify the required parameter 'row_id' is set if ($row_id === null || (is_array($row_id) && count($row_id) === 0)) { throw new \InvalidArgumentException( @@ -2604,13 +2611,6 @@ public function purgeDraftTableRowRequest($row_id, $table_id_or_name, string $co throw new \InvalidArgumentException("invalid value for \"row_id\" when calling RowsApi.purgeDraftTableRow, must conform to the pattern /\\d+/."); } - // verify the required parameter 'table_id_or_name' is set - if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $table_id_or_name when calling purgeDraftTableRow' - ); - } - $resourcePath = '/cms/v3/hubdb/tables/{tableIdOrName}/rows/{rowId}/draft'; $formParams = []; @@ -2622,18 +2622,18 @@ public function purgeDraftTableRowRequest($row_id, $table_id_or_name, string $co // path params - if ($row_id !== null) { + if ($table_id_or_name !== null) { $resourcePath = str_replace( - '{' . 'rowId' . '}', - ObjectSerializer::toPathValue($row_id), + '{' . 'tableIdOrName' . '}', + ObjectSerializer::toPathValue($table_id_or_name), $resourcePath ); } // path params - if ($table_id_or_name !== null) { + if ($row_id !== null) { $resourcePath = str_replace( - '{' . 'tableIdOrName' . '}', - ObjectSerializer::toPathValue($table_id_or_name), + '{' . 'rowId' . '}', + ObjectSerializer::toPathValue($row_id), $resourcePath ); } @@ -3588,8 +3588,8 @@ public function readTableRowsRequest($table_id_or_name, $batch_input_string, str * * Replace an existing row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3Request $hub_db_table_row_v3_request hub_db_table_row_v3_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['replaceDraftTableRow'] to see the possible values for this operation * @@ -3597,9 +3597,9 @@ public function readTableRowsRequest($table_id_or_name, $batch_input_string, str * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function replaceDraftTableRow($row_id, $table_id_or_name, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['replaceDraftTableRow'][0]) + public function replaceDraftTableRow($table_id_or_name, $row_id, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['replaceDraftTableRow'][0]) { - list($response) = $this->replaceDraftTableRowWithHttpInfo($row_id, $table_id_or_name, $hub_db_table_row_v3_request, $contentType); + list($response) = $this->replaceDraftTableRowWithHttpInfo($table_id_or_name, $row_id, $hub_db_table_row_v3_request, $contentType); return $response; } @@ -3608,8 +3608,8 @@ public function replaceDraftTableRow($row_id, $table_id_or_name, $hub_db_table_r * * Replace an existing row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3Request $hub_db_table_row_v3_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['replaceDraftTableRow'] to see the possible values for this operation * @@ -3617,9 +3617,9 @@ public function replaceDraftTableRow($row_id, $table_id_or_name, $hub_db_table_r * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function replaceDraftTableRowWithHttpInfo($row_id, $table_id_or_name, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['replaceDraftTableRow'][0]) + public function replaceDraftTableRowWithHttpInfo($table_id_or_name, $row_id, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['replaceDraftTableRow'][0]) { - $request = $this->replaceDraftTableRowRequest($row_id, $table_id_or_name, $hub_db_table_row_v3_request, $contentType); + $request = $this->replaceDraftTableRowRequest($table_id_or_name, $row_id, $hub_db_table_row_v3_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -3709,17 +3709,17 @@ public function replaceDraftTableRowWithHttpInfo($row_id, $table_id_or_name, $hu * * Replace an existing row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3Request $hub_db_table_row_v3_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['replaceDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function replaceDraftTableRowAsync($row_id, $table_id_or_name, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['replaceDraftTableRow'][0]) + public function replaceDraftTableRowAsync($table_id_or_name, $row_id, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['replaceDraftTableRow'][0]) { - return $this->replaceDraftTableRowAsyncWithHttpInfo($row_id, $table_id_or_name, $hub_db_table_row_v3_request, $contentType) + return $this->replaceDraftTableRowAsyncWithHttpInfo($table_id_or_name, $row_id, $hub_db_table_row_v3_request, $contentType) ->then( function ($response) { return $response[0]; @@ -3732,18 +3732,18 @@ function ($response) { * * Replace an existing row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3Request $hub_db_table_row_v3_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['replaceDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function replaceDraftTableRowAsyncWithHttpInfo($row_id, $table_id_or_name, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['replaceDraftTableRow'][0]) + public function replaceDraftTableRowAsyncWithHttpInfo($table_id_or_name, $row_id, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['replaceDraftTableRow'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3'; - $request = $this->replaceDraftTableRowRequest($row_id, $table_id_or_name, $hub_db_table_row_v3_request, $contentType); + $request = $this->replaceDraftTableRowRequest($table_id_or_name, $row_id, $hub_db_table_row_v3_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3784,17 +3784,24 @@ function ($exception) { /** * Create request for operation 'replaceDraftTableRow' * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3Request $hub_db_table_row_v3_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['replaceDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function replaceDraftTableRowRequest($row_id, $table_id_or_name, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['replaceDraftTableRow'][0]) + public function replaceDraftTableRowRequest($table_id_or_name, $row_id, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['replaceDraftTableRow'][0]) { + // verify the required parameter 'table_id_or_name' is set + if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $table_id_or_name when calling replaceDraftTableRow' + ); + } + // verify the required parameter 'row_id' is set if ($row_id === null || (is_array($row_id) && count($row_id) === 0)) { throw new \InvalidArgumentException( @@ -3805,13 +3812,6 @@ public function replaceDraftTableRowRequest($row_id, $table_id_or_name, $hub_db_ throw new \InvalidArgumentException("invalid value for \"row_id\" when calling RowsApi.replaceDraftTableRow, must conform to the pattern /\\d+/."); } - // verify the required parameter 'table_id_or_name' is set - if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $table_id_or_name when calling replaceDraftTableRow' - ); - } - // verify the required parameter 'hub_db_table_row_v3_request' is set if ($hub_db_table_row_v3_request === null || (is_array($hub_db_table_row_v3_request) && count($hub_db_table_row_v3_request) === 0)) { throw new \InvalidArgumentException( @@ -3830,18 +3830,18 @@ public function replaceDraftTableRowRequest($row_id, $table_id_or_name, $hub_db_ // path params - if ($row_id !== null) { + if ($table_id_or_name !== null) { $resourcePath = str_replace( - '{' . 'rowId' . '}', - ObjectSerializer::toPathValue($row_id), + '{' . 'tableIdOrName' . '}', + ObjectSerializer::toPathValue($table_id_or_name), $resourcePath ); } // path params - if ($table_id_or_name !== null) { + if ($row_id !== null) { $resourcePath = str_replace( - '{' . 'tableIdOrName' . '}', - ObjectSerializer::toPathValue($table_id_or_name), + '{' . 'rowId' . '}', + ObjectSerializer::toPathValue($row_id), $resourcePath ); } @@ -4235,8 +4235,8 @@ public function replaceDraftTableRowsRequest($table_id_or_name, $batch_input_hub * * Update a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3Request $hub_db_table_row_v3_request hub_db_table_row_v3_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateDraftTableRow'] to see the possible values for this operation * @@ -4244,9 +4244,9 @@ public function replaceDraftTableRowsRequest($table_id_or_name, $batch_input_hub * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function updateDraftTableRow($row_id, $table_id_or_name, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['updateDraftTableRow'][0]) + public function updateDraftTableRow($table_id_or_name, $row_id, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['updateDraftTableRow'][0]) { - list($response) = $this->updateDraftTableRowWithHttpInfo($row_id, $table_id_or_name, $hub_db_table_row_v3_request, $contentType); + list($response) = $this->updateDraftTableRowWithHttpInfo($table_id_or_name, $row_id, $hub_db_table_row_v3_request, $contentType); return $response; } @@ -4255,8 +4255,8 @@ public function updateDraftTableRow($row_id, $table_id_or_name, $hub_db_table_ro * * Update a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3Request $hub_db_table_row_v3_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateDraftTableRow'] to see the possible values for this operation * @@ -4264,9 +4264,9 @@ public function updateDraftTableRow($row_id, $table_id_or_name, $hub_db_table_ro * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateDraftTableRowWithHttpInfo($row_id, $table_id_or_name, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['updateDraftTableRow'][0]) + public function updateDraftTableRowWithHttpInfo($table_id_or_name, $row_id, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['updateDraftTableRow'][0]) { - $request = $this->updateDraftTableRowRequest($row_id, $table_id_or_name, $hub_db_table_row_v3_request, $contentType); + $request = $this->updateDraftTableRowRequest($table_id_or_name, $row_id, $hub_db_table_row_v3_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -4356,17 +4356,17 @@ public function updateDraftTableRowWithHttpInfo($row_id, $table_id_or_name, $hub * * Update a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3Request $hub_db_table_row_v3_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateDraftTableRowAsync($row_id, $table_id_or_name, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['updateDraftTableRow'][0]) + public function updateDraftTableRowAsync($table_id_or_name, $row_id, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['updateDraftTableRow'][0]) { - return $this->updateDraftTableRowAsyncWithHttpInfo($row_id, $table_id_or_name, $hub_db_table_row_v3_request, $contentType) + return $this->updateDraftTableRowAsyncWithHttpInfo($table_id_or_name, $row_id, $hub_db_table_row_v3_request, $contentType) ->then( function ($response) { return $response[0]; @@ -4379,18 +4379,18 @@ function ($response) { * * Update a row * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3Request $hub_db_table_row_v3_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateDraftTableRowAsyncWithHttpInfo($row_id, $table_id_or_name, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['updateDraftTableRow'][0]) + public function updateDraftTableRowAsyncWithHttpInfo($table_id_or_name, $row_id, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['updateDraftTableRow'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3'; - $request = $this->updateDraftTableRowRequest($row_id, $table_id_or_name, $hub_db_table_row_v3_request, $contentType); + $request = $this->updateDraftTableRowRequest($table_id_or_name, $row_id, $hub_db_table_row_v3_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4431,17 +4431,24 @@ function ($exception) { /** * Create request for operation 'updateDraftTableRow' * - * @param string $row_id (required) * @param string $table_id_or_name (required) + * @param string $row_id (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableRowV3Request $hub_db_table_row_v3_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateDraftTableRow'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateDraftTableRowRequest($row_id, $table_id_or_name, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['updateDraftTableRow'][0]) + public function updateDraftTableRowRequest($table_id_or_name, $row_id, $hub_db_table_row_v3_request, string $contentType = self::contentTypes['updateDraftTableRow'][0]) { + // verify the required parameter 'table_id_or_name' is set + if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $table_id_or_name when calling updateDraftTableRow' + ); + } + // verify the required parameter 'row_id' is set if ($row_id === null || (is_array($row_id) && count($row_id) === 0)) { throw new \InvalidArgumentException( @@ -4452,13 +4459,6 @@ public function updateDraftTableRowRequest($row_id, $table_id_or_name, $hub_db_t throw new \InvalidArgumentException("invalid value for \"row_id\" when calling RowsApi.updateDraftTableRow, must conform to the pattern /\\d+/."); } - // verify the required parameter 'table_id_or_name' is set - if ($table_id_or_name === null || (is_array($table_id_or_name) && count($table_id_or_name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $table_id_or_name when calling updateDraftTableRow' - ); - } - // verify the required parameter 'hub_db_table_row_v3_request' is set if ($hub_db_table_row_v3_request === null || (is_array($hub_db_table_row_v3_request) && count($hub_db_table_row_v3_request) === 0)) { throw new \InvalidArgumentException( @@ -4477,18 +4477,18 @@ public function updateDraftTableRowRequest($row_id, $table_id_or_name, $hub_db_t // path params - if ($row_id !== null) { + if ($table_id_or_name !== null) { $resourcePath = str_replace( - '{' . 'rowId' . '}', - ObjectSerializer::toPathValue($row_id), + '{' . 'tableIdOrName' . '}', + ObjectSerializer::toPathValue($table_id_or_name), $resourcePath ); } // path params - if ($table_id_or_name !== null) { + if ($row_id !== null) { $resourcePath = str_replace( - '{' . 'tableIdOrName' . '}', - ObjectSerializer::toPathValue($table_id_or_name), + '{' . 'rowId' . '}', + ObjectSerializer::toPathValue($row_id), $resourcePath ); } diff --git a/codegen/Cms/Hubdb/Api/TablesApi.php b/codegen/Cms/Hubdb/Api/TablesApi.php index c079c632..b7a07c26 100644 --- a/codegen/Cms/Hubdb/Api/TablesApi.php +++ b/codegen/Cms/Hubdb/Api/TablesApi.php @@ -1596,27 +1596,27 @@ public function exportTableRequest($table_id_or_name, $format = null, string $co * * Return all draft tables * + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string|null $content_type (optional) - * @param \DateTime|null $created_after (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) * @param \DateTime|null $created_before (optional) - * @param bool|null $is_get_localized_schema (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_before (optional) + * @param string|null $content_type (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllDraftTables'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\CollectionResponseWithTotalHubDbTableV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function getAllDraftTables($after = null, $archived = null, $content_type = null, $created_after = null, $created_at = null, $created_before = null, $is_get_localized_schema = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getAllDraftTables'][0]) + public function getAllDraftTables($sort = null, $after = null, $limit = null, $created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $content_type = null, $archived = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getAllDraftTables'][0]) { - list($response) = $this->getAllDraftTablesWithHttpInfo($after, $archived, $content_type, $created_after, $created_at, $created_before, $is_get_localized_schema, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getAllDraftTablesWithHttpInfo($sort, $after, $limit, $created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $content_type, $archived, $is_get_localized_schema, $contentType); return $response; } @@ -1625,27 +1625,27 @@ public function getAllDraftTables($after = null, $archived = null, $content_type * * Return all draft tables * + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string|null $content_type (optional) - * @param \DateTime|null $created_after (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) * @param \DateTime|null $created_before (optional) - * @param bool|null $is_get_localized_schema (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_before (optional) + * @param string|null $content_type (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllDraftTables'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\CollectionResponseWithTotalHubDbTableV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getAllDraftTablesWithHttpInfo($after = null, $archived = null, $content_type = null, $created_after = null, $created_at = null, $created_before = null, $is_get_localized_schema = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getAllDraftTables'][0]) + public function getAllDraftTablesWithHttpInfo($sort = null, $after = null, $limit = null, $created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $content_type = null, $archived = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getAllDraftTables'][0]) { - $request = $this->getAllDraftTablesRequest($after, $archived, $content_type, $created_after, $created_at, $created_before, $is_get_localized_schema, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getAllDraftTablesRequest($sort, $after, $limit, $created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $content_type, $archived, $is_get_localized_schema, $contentType); try { $options = $this->createHttpClientOption(); @@ -1735,26 +1735,26 @@ public function getAllDraftTablesWithHttpInfo($after = null, $archived = null, $ * * Return all draft tables * + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string|null $content_type (optional) - * @param \DateTime|null $created_after (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) * @param \DateTime|null $created_before (optional) - * @param bool|null $is_get_localized_schema (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_before (optional) + * @param string|null $content_type (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllDraftTables'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllDraftTablesAsync($after = null, $archived = null, $content_type = null, $created_after = null, $created_at = null, $created_before = null, $is_get_localized_schema = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getAllDraftTables'][0]) + public function getAllDraftTablesAsync($sort = null, $after = null, $limit = null, $created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $content_type = null, $archived = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getAllDraftTables'][0]) { - return $this->getAllDraftTablesAsyncWithHttpInfo($after, $archived, $content_type, $created_after, $created_at, $created_before, $is_get_localized_schema, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getAllDraftTablesAsyncWithHttpInfo($sort, $after, $limit, $created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $content_type, $archived, $is_get_localized_schema, $contentType) ->then( function ($response) { return $response[0]; @@ -1767,27 +1767,27 @@ function ($response) { * * Return all draft tables * + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string|null $content_type (optional) - * @param \DateTime|null $created_after (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) * @param \DateTime|null $created_before (optional) - * @param bool|null $is_get_localized_schema (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_before (optional) + * @param string|null $content_type (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllDraftTables'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllDraftTablesAsyncWithHttpInfo($after = null, $archived = null, $content_type = null, $created_after = null, $created_at = null, $created_before = null, $is_get_localized_schema = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getAllDraftTables'][0]) + public function getAllDraftTablesAsyncWithHttpInfo($sort = null, $after = null, $limit = null, $created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $content_type = null, $archived = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getAllDraftTables'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\CollectionResponseWithTotalHubDbTableV3'; - $request = $this->getAllDraftTablesRequest($after, $archived, $content_type, $created_after, $created_at, $created_before, $is_get_localized_schema, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getAllDraftTablesRequest($sort, $after, $limit, $created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $content_type, $archived, $is_get_localized_schema, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1828,24 +1828,24 @@ function ($exception) { /** * Create request for operation 'getAllDraftTables' * + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string|null $content_type (optional) - * @param \DateTime|null $created_after (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) * @param \DateTime|null $created_before (optional) - * @param bool|null $is_get_localized_schema (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_before (optional) + * @param string|null $content_type (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllDraftTables'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAllDraftTablesRequest($after = null, $archived = null, $content_type = null, $created_after = null, $created_at = null, $created_before = null, $is_get_localized_schema = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getAllDraftTables'][0]) + public function getAllDraftTablesRequest($sort = null, $after = null, $limit = null, $created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $content_type = null, $archived = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getAllDraftTables'][0]) { @@ -1870,35 +1870,35 @@ public function getAllDraftTablesRequest($after = null, $archived = null, $conte // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $sort, + 'sort', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $content_type, - 'contentType', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_after, - 'createdAfter', // param base name + $created_at, + 'createdAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1906,8 +1906,8 @@ public function getAllDraftTablesRequest($after = null, $archived = null, $conte ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name + $created_after, + 'createdAfter', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1924,35 +1924,35 @@ public function getAllDraftTablesRequest($after = null, $archived = null, $conte ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $is_get_localized_schema, - 'isGetLocalizedSchema', // param base name - 'boolean', // openApiType + $updated_at, + 'updatedAt', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType + $updated_before, + 'updatedBefore', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name + $content_type, + 'contentType', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1960,18 +1960,18 @@ public function getAllDraftTablesRequest($after = null, $archived = null, $conte ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name - 'string', // openApiType + $is_get_localized_schema, + 'isGetLocalizedSchema', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required @@ -2042,27 +2042,27 @@ public function getAllDraftTablesRequest($after = null, $archived = null, $conte * * Get all published tables * + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string|null $content_type (optional) - * @param \DateTime|null $created_after (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) * @param \DateTime|null $created_before (optional) - * @param bool|null $is_get_localized_schema (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_before (optional) + * @param string|null $content_type (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllTables'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\CollectionResponseWithTotalHubDbTableV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function getAllTables($after = null, $archived = null, $content_type = null, $created_after = null, $created_at = null, $created_before = null, $is_get_localized_schema = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getAllTables'][0]) + public function getAllTables($sort = null, $after = null, $limit = null, $created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $content_type = null, $archived = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getAllTables'][0]) { - list($response) = $this->getAllTablesWithHttpInfo($after, $archived, $content_type, $created_after, $created_at, $created_before, $is_get_localized_schema, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getAllTablesWithHttpInfo($sort, $after, $limit, $created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $content_type, $archived, $is_get_localized_schema, $contentType); return $response; } @@ -2071,27 +2071,27 @@ public function getAllTables($after = null, $archived = null, $content_type = nu * * Get all published tables * + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string|null $content_type (optional) - * @param \DateTime|null $created_after (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) * @param \DateTime|null $created_before (optional) - * @param bool|null $is_get_localized_schema (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_before (optional) + * @param string|null $content_type (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllTables'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\CollectionResponseWithTotalHubDbTableV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getAllTablesWithHttpInfo($after = null, $archived = null, $content_type = null, $created_after = null, $created_at = null, $created_before = null, $is_get_localized_schema = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getAllTables'][0]) + public function getAllTablesWithHttpInfo($sort = null, $after = null, $limit = null, $created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $content_type = null, $archived = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getAllTables'][0]) { - $request = $this->getAllTablesRequest($after, $archived, $content_type, $created_after, $created_at, $created_before, $is_get_localized_schema, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getAllTablesRequest($sort, $after, $limit, $created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $content_type, $archived, $is_get_localized_schema, $contentType); try { $options = $this->createHttpClientOption(); @@ -2181,26 +2181,26 @@ public function getAllTablesWithHttpInfo($after = null, $archived = null, $conte * * Get all published tables * + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string|null $content_type (optional) - * @param \DateTime|null $created_after (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) * @param \DateTime|null $created_before (optional) - * @param bool|null $is_get_localized_schema (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_before (optional) + * @param string|null $content_type (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllTables'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllTablesAsync($after = null, $archived = null, $content_type = null, $created_after = null, $created_at = null, $created_before = null, $is_get_localized_schema = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getAllTables'][0]) + public function getAllTablesAsync($sort = null, $after = null, $limit = null, $created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $content_type = null, $archived = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getAllTables'][0]) { - return $this->getAllTablesAsyncWithHttpInfo($after, $archived, $content_type, $created_after, $created_at, $created_before, $is_get_localized_schema, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getAllTablesAsyncWithHttpInfo($sort, $after, $limit, $created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $content_type, $archived, $is_get_localized_schema, $contentType) ->then( function ($response) { return $response[0]; @@ -2213,27 +2213,27 @@ function ($response) { * * Get all published tables * + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string|null $content_type (optional) - * @param \DateTime|null $created_after (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) * @param \DateTime|null $created_before (optional) - * @param bool|null $is_get_localized_schema (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_before (optional) + * @param string|null $content_type (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllTables'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAllTablesAsyncWithHttpInfo($after = null, $archived = null, $content_type = null, $created_after = null, $created_at = null, $created_before = null, $is_get_localized_schema = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getAllTables'][0]) + public function getAllTablesAsyncWithHttpInfo($sort = null, $after = null, $limit = null, $created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $content_type = null, $archived = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getAllTables'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\CollectionResponseWithTotalHubDbTableV3'; - $request = $this->getAllTablesRequest($after, $archived, $content_type, $created_after, $created_at, $created_before, $is_get_localized_schema, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getAllTablesRequest($sort, $after, $limit, $created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $content_type, $archived, $is_get_localized_schema, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2274,24 +2274,24 @@ function ($exception) { /** * Create request for operation 'getAllTables' * + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string|null $content_type (optional) - * @param \DateTime|null $created_after (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) * @param \DateTime|null $created_before (optional) - * @param bool|null $is_get_localized_schema (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_before (optional) + * @param string|null $content_type (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllTables'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAllTablesRequest($after = null, $archived = null, $content_type = null, $created_after = null, $created_at = null, $created_before = null, $is_get_localized_schema = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getAllTables'][0]) + public function getAllTablesRequest($sort = null, $after = null, $limit = null, $created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $content_type = null, $archived = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getAllTables'][0]) { @@ -2316,35 +2316,35 @@ public function getAllTablesRequest($after = null, $archived = null, $content_ty // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $sort, + 'sort', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $content_type, - 'contentType', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_after, - 'createdAfter', // param base name + $created_at, + 'createdAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -2352,8 +2352,8 @@ public function getAllTablesRequest($after = null, $archived = null, $content_ty ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name + $created_after, + 'createdAfter', // param base name 'string', // openApiType 'form', // style true, // explode @@ -2370,35 +2370,35 @@ public function getAllTablesRequest($after = null, $archived = null, $content_ty ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $is_get_localized_schema, - 'isGetLocalizedSchema', // param base name - 'boolean', // openApiType + $updated_at, + 'updatedAt', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType + $updated_before, + 'updatedBefore', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name + $content_type, + 'contentType', // param base name 'string', // openApiType 'form', // style true, // explode @@ -2406,18 +2406,18 @@ public function getAllTablesRequest($after = null, $archived = null, $content_ty ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name - 'string', // openApiType + $is_get_localized_schema, + 'isGetLocalizedSchema', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required @@ -2489,18 +2489,18 @@ public function getAllTablesRequest($after = null, $archived = null, $content_ty * Get details for a draft table * * @param string $table_id_or_name (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDraftTableDetailsById'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function getDraftTableDetailsById($table_id_or_name, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getDraftTableDetailsById'][0]) + public function getDraftTableDetailsById($table_id_or_name, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['getDraftTableDetailsById'][0]) { - list($response) = $this->getDraftTableDetailsByIdWithHttpInfo($table_id_or_name, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType); + list($response) = $this->getDraftTableDetailsByIdWithHttpInfo($table_id_or_name, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType); return $response; } @@ -2510,18 +2510,18 @@ public function getDraftTableDetailsById($table_id_or_name, $archived = null, $i * Get details for a draft table * * @param string $table_id_or_name (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDraftTableDetailsById'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getDraftTableDetailsByIdWithHttpInfo($table_id_or_name, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getDraftTableDetailsById'][0]) + public function getDraftTableDetailsByIdWithHttpInfo($table_id_or_name, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['getDraftTableDetailsById'][0]) { - $request = $this->getDraftTableDetailsByIdRequest($table_id_or_name, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType); + $request = $this->getDraftTableDetailsByIdRequest($table_id_or_name, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType); try { $options = $this->createHttpClientOption(); @@ -2612,17 +2612,17 @@ public function getDraftTableDetailsByIdWithHttpInfo($table_id_or_name, $archive * Get details for a draft table * * @param string $table_id_or_name (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDraftTableDetailsById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDraftTableDetailsByIdAsync($table_id_or_name, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getDraftTableDetailsById'][0]) + public function getDraftTableDetailsByIdAsync($table_id_or_name, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['getDraftTableDetailsById'][0]) { - return $this->getDraftTableDetailsByIdAsyncWithHttpInfo($table_id_or_name, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType) + return $this->getDraftTableDetailsByIdAsyncWithHttpInfo($table_id_or_name, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType) ->then( function ($response) { return $response[0]; @@ -2636,18 +2636,18 @@ function ($response) { * Get details for a draft table * * @param string $table_id_or_name (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDraftTableDetailsById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getDraftTableDetailsByIdAsyncWithHttpInfo($table_id_or_name, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getDraftTableDetailsById'][0]) + public function getDraftTableDetailsByIdAsyncWithHttpInfo($table_id_or_name, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['getDraftTableDetailsById'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3'; - $request = $this->getDraftTableDetailsByIdRequest($table_id_or_name, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType); + $request = $this->getDraftTableDetailsByIdRequest($table_id_or_name, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2689,15 +2689,15 @@ function ($exception) { * Create request for operation 'getDraftTableDetailsById' * * @param string $table_id_or_name (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getDraftTableDetailsById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getDraftTableDetailsByIdRequest($table_id_or_name, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getDraftTableDetailsById'][0]) + public function getDraftTableDetailsByIdRequest($table_id_or_name, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['getDraftTableDetailsById'][0]) { // verify the required parameter 'table_id_or_name' is set @@ -2720,8 +2720,8 @@ public function getDraftTableDetailsByIdRequest($table_id_or_name, $archived = n // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name + $is_get_localized_schema, + 'isGetLocalizedSchema', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -2729,8 +2729,8 @@ public function getDraftTableDetailsByIdRequest($table_id_or_name, $archived = n ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include_foreign_ids, - 'includeForeignIds', // param base name + $archived, + 'archived', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -2738,8 +2738,8 @@ public function getDraftTableDetailsByIdRequest($table_id_or_name, $archived = n ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $is_get_localized_schema, - 'isGetLocalizedSchema', // param base name + $include_foreign_ids, + 'includeForeignIds', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -2820,18 +2820,18 @@ public function getDraftTableDetailsByIdRequest($table_id_or_name, $archived = n * Get details of a published table * * @param string $table_id_or_name (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableDetails'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function getTableDetails($table_id_or_name, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getTableDetails'][0]) + public function getTableDetails($table_id_or_name, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['getTableDetails'][0]) { - list($response) = $this->getTableDetailsWithHttpInfo($table_id_or_name, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType); + list($response) = $this->getTableDetailsWithHttpInfo($table_id_or_name, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType); return $response; } @@ -2841,18 +2841,18 @@ public function getTableDetails($table_id_or_name, $archived = null, $include_fo * Get details of a published table * * @param string $table_id_or_name (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableDetails'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getTableDetailsWithHttpInfo($table_id_or_name, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getTableDetails'][0]) + public function getTableDetailsWithHttpInfo($table_id_or_name, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['getTableDetails'][0]) { - $request = $this->getTableDetailsRequest($table_id_or_name, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType); + $request = $this->getTableDetailsRequest($table_id_or_name, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType); try { $options = $this->createHttpClientOption(); @@ -2943,17 +2943,17 @@ public function getTableDetailsWithHttpInfo($table_id_or_name, $archived = null, * Get details of a published table * * @param string $table_id_or_name (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTableDetailsAsync($table_id_or_name, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getTableDetails'][0]) + public function getTableDetailsAsync($table_id_or_name, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['getTableDetails'][0]) { - return $this->getTableDetailsAsyncWithHttpInfo($table_id_or_name, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType) + return $this->getTableDetailsAsyncWithHttpInfo($table_id_or_name, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType) ->then( function ($response) { return $response[0]; @@ -2967,18 +2967,18 @@ function ($response) { * Get details of a published table * * @param string $table_id_or_name (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTableDetailsAsyncWithHttpInfo($table_id_or_name, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getTableDetails'][0]) + public function getTableDetailsAsyncWithHttpInfo($table_id_or_name, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['getTableDetails'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3'; - $request = $this->getTableDetailsRequest($table_id_or_name, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType); + $request = $this->getTableDetailsRequest($table_id_or_name, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3020,15 +3020,15 @@ function ($exception) { * Create request for operation 'getTableDetails' * * @param string $table_id_or_name (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTableDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTableDetailsRequest($table_id_or_name, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['getTableDetails'][0]) + public function getTableDetailsRequest($table_id_or_name, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['getTableDetails'][0]) { // verify the required parameter 'table_id_or_name' is set @@ -3051,8 +3051,8 @@ public function getTableDetailsRequest($table_id_or_name, $archived = null, $inc // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name + $is_get_localized_schema, + 'isGetLocalizedSchema', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -3060,8 +3060,8 @@ public function getTableDetailsRequest($table_id_or_name, $archived = null, $inc ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include_foreign_ids, - 'includeForeignIds', // param base name + $archived, + 'archived', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -3069,8 +3069,8 @@ public function getTableDetailsRequest($table_id_or_name, $archived = null, $inc ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $is_get_localized_schema, - 'isGetLocalizedSchema', // param base name + $include_foreign_ids, + 'includeForeignIds', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -3761,21 +3761,21 @@ public function publishDraftTableRequest($table_id_or_name, $include_foreign_ids * Get rows from draft table * * @param string $table_id_or_name (required) + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $offset (optional) * @param string[]|null $properties (optional) - * @param string[]|null $sort (optional) + * @param int|null $offset (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['readDraftTableRows'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function readDraftTableRows($table_id_or_name, $after = null, $archived = null, $limit = null, $offset = null, $properties = null, $sort = null, string $contentType = self::contentTypes['readDraftTableRows'][0]) + public function readDraftTableRows($table_id_or_name, $sort = null, $after = null, $limit = null, $properties = null, $offset = null, $archived = null, string $contentType = self::contentTypes['readDraftTableRows'][0]) { - list($response) = $this->readDraftTableRowsWithHttpInfo($table_id_or_name, $after, $archived, $limit, $offset, $properties, $sort, $contentType); + list($response) = $this->readDraftTableRowsWithHttpInfo($table_id_or_name, $sort, $after, $limit, $properties, $offset, $archived, $contentType); return $response; } @@ -3785,21 +3785,21 @@ public function readDraftTableRows($table_id_or_name, $after = null, $archived = * Get rows from draft table * * @param string $table_id_or_name (required) + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $offset (optional) * @param string[]|null $properties (optional) - * @param string[]|null $sort (optional) + * @param int|null $offset (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['readDraftTableRows'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function readDraftTableRowsWithHttpInfo($table_id_or_name, $after = null, $archived = null, $limit = null, $offset = null, $properties = null, $sort = null, string $contentType = self::contentTypes['readDraftTableRows'][0]) + public function readDraftTableRowsWithHttpInfo($table_id_or_name, $sort = null, $after = null, $limit = null, $properties = null, $offset = null, $archived = null, string $contentType = self::contentTypes['readDraftTableRows'][0]) { - $request = $this->readDraftTableRowsRequest($table_id_or_name, $after, $archived, $limit, $offset, $properties, $sort, $contentType); + $request = $this->readDraftTableRowsRequest($table_id_or_name, $sort, $after, $limit, $properties, $offset, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -3890,20 +3890,20 @@ public function readDraftTableRowsWithHttpInfo($table_id_or_name, $after = null, * Get rows from draft table * * @param string $table_id_or_name (required) + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $offset (optional) * @param string[]|null $properties (optional) - * @param string[]|null $sort (optional) + * @param int|null $offset (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['readDraftTableRows'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function readDraftTableRowsAsync($table_id_or_name, $after = null, $archived = null, $limit = null, $offset = null, $properties = null, $sort = null, string $contentType = self::contentTypes['readDraftTableRows'][0]) + public function readDraftTableRowsAsync($table_id_or_name, $sort = null, $after = null, $limit = null, $properties = null, $offset = null, $archived = null, string $contentType = self::contentTypes['readDraftTableRows'][0]) { - return $this->readDraftTableRowsAsyncWithHttpInfo($table_id_or_name, $after, $archived, $limit, $offset, $properties, $sort, $contentType) + return $this->readDraftTableRowsAsyncWithHttpInfo($table_id_or_name, $sort, $after, $limit, $properties, $offset, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -3917,21 +3917,21 @@ function ($response) { * Get rows from draft table * * @param string $table_id_or_name (required) + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $offset (optional) * @param string[]|null $properties (optional) - * @param string[]|null $sort (optional) + * @param int|null $offset (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['readDraftTableRows'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function readDraftTableRowsAsyncWithHttpInfo($table_id_or_name, $after = null, $archived = null, $limit = null, $offset = null, $properties = null, $sort = null, string $contentType = self::contentTypes['readDraftTableRows'][0]) + public function readDraftTableRowsAsyncWithHttpInfo($table_id_or_name, $sort = null, $after = null, $limit = null, $properties = null, $offset = null, $archived = null, string $contentType = self::contentTypes['readDraftTableRows'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\UnifiedCollectionResponseWithTotalBaseHubDbTableRowV3'; - $request = $this->readDraftTableRowsRequest($table_id_or_name, $after, $archived, $limit, $offset, $properties, $sort, $contentType); + $request = $this->readDraftTableRowsRequest($table_id_or_name, $sort, $after, $limit, $properties, $offset, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3973,18 +3973,18 @@ function ($exception) { * Create request for operation 'readDraftTableRows' * * @param string $table_id_or_name (required) + * @param string[]|null $sort (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $offset (optional) * @param string[]|null $properties (optional) - * @param string[]|null $sort (optional) + * @param int|null $offset (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['readDraftTableRows'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function readDraftTableRowsRequest($table_id_or_name, $after = null, $archived = null, $limit = null, $offset = null, $properties = null, $sort = null, string $contentType = self::contentTypes['readDraftTableRows'][0]) + public function readDraftTableRowsRequest($table_id_or_name, $sort = null, $after = null, $limit = null, $properties = null, $offset = null, $archived = null, string $contentType = self::contentTypes['readDraftTableRows'][0]) { // verify the required parameter 'table_id_or_name' is set @@ -4010,18 +4010,18 @@ public function readDraftTableRowsRequest($table_id_or_name, $after = null, $arc // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $sort, + 'sort', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -4037,27 +4037,27 @@ public function readDraftTableRowsRequest($table_id_or_name, $after = null, $arc ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $offset, - 'offset', // param base name - 'integer', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $offset, + 'offset', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required @@ -4993,18 +4993,18 @@ public function unpublishTableRequest($table_id_or_name, $include_foreign_ids = * * @param string $table_id_or_name (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3Request $hub_db_table_v3_request hub_db_table_v3_request (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateDraftTable'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3|\HubSpot\Client\Cms\Hubdb\Model\Error */ - public function updateDraftTable($table_id_or_name, $hub_db_table_v3_request, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['updateDraftTable'][0]) + public function updateDraftTable($table_id_or_name, $hub_db_table_v3_request, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['updateDraftTable'][0]) { - list($response) = $this->updateDraftTableWithHttpInfo($table_id_or_name, $hub_db_table_v3_request, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType); + list($response) = $this->updateDraftTableWithHttpInfo($table_id_or_name, $hub_db_table_v3_request, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType); return $response; } @@ -5015,18 +5015,18 @@ public function updateDraftTable($table_id_or_name, $hub_db_table_v3_request, $a * * @param string $table_id_or_name (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3Request $hub_db_table_v3_request (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateDraftTable'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Hubdb\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3|\HubSpot\Client\Cms\Hubdb\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateDraftTableWithHttpInfo($table_id_or_name, $hub_db_table_v3_request, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['updateDraftTable'][0]) + public function updateDraftTableWithHttpInfo($table_id_or_name, $hub_db_table_v3_request, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['updateDraftTable'][0]) { - $request = $this->updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_request, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType); + $request = $this->updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_request, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType); try { $options = $this->createHttpClientOption(); @@ -5118,17 +5118,17 @@ public function updateDraftTableWithHttpInfo($table_id_or_name, $hub_db_table_v3 * * @param string $table_id_or_name (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3Request $hub_db_table_v3_request (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateDraftTable'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateDraftTableAsync($table_id_or_name, $hub_db_table_v3_request, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['updateDraftTable'][0]) + public function updateDraftTableAsync($table_id_or_name, $hub_db_table_v3_request, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['updateDraftTable'][0]) { - return $this->updateDraftTableAsyncWithHttpInfo($table_id_or_name, $hub_db_table_v3_request, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType) + return $this->updateDraftTableAsyncWithHttpInfo($table_id_or_name, $hub_db_table_v3_request, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType) ->then( function ($response) { return $response[0]; @@ -5143,18 +5143,18 @@ function ($response) { * * @param string $table_id_or_name (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3Request $hub_db_table_v3_request (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateDraftTable'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateDraftTableAsyncWithHttpInfo($table_id_or_name, $hub_db_table_v3_request, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['updateDraftTable'][0]) + public function updateDraftTableAsyncWithHttpInfo($table_id_or_name, $hub_db_table_v3_request, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['updateDraftTable'][0]) { $returnType = '\HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3'; - $request = $this->updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_request, $archived, $include_foreign_ids, $is_get_localized_schema, $contentType); + $request = $this->updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_request, $is_get_localized_schema, $archived, $include_foreign_ids, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5197,15 +5197,15 @@ function ($exception) { * * @param string $table_id_or_name (required) * @param \HubSpot\Client\Cms\Hubdb\Model\HubDbTableV3Request $hub_db_table_v3_request (required) + * @param bool|null $is_get_localized_schema (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) * @param bool|null $include_foreign_ids (optional) - * @param bool|null $is_get_localized_schema (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateDraftTable'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_request, $archived = null, $include_foreign_ids = null, $is_get_localized_schema = null, string $contentType = self::contentTypes['updateDraftTable'][0]) + public function updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_request, $is_get_localized_schema = null, $archived = null, $include_foreign_ids = null, string $contentType = self::contentTypes['updateDraftTable'][0]) { // verify the required parameter 'table_id_or_name' is set @@ -5235,8 +5235,8 @@ public function updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_requ // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name + $is_get_localized_schema, + 'isGetLocalizedSchema', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -5244,8 +5244,8 @@ public function updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_requ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include_foreign_ids, - 'includeForeignIds', // param base name + $archived, + 'archived', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -5253,8 +5253,8 @@ public function updateDraftTableRequest($table_id_or_name, $hub_db_table_v3_requ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $is_get_localized_schema, - 'isGetLocalizedSchema', // param base name + $include_foreign_ids, + 'includeForeignIds', // param base name 'boolean', // openApiType 'form', // style true, // explode diff --git a/codegen/Cms/Pages/Api/BasicApi.php b/codegen/Cms/Pages/Api/BasicApi.php index 2a3e67ab..45a878cc 100644 --- a/codegen/Cms/Pages/Api/BasicApi.php +++ b/codegen/Cms/Pages/Api/BasicApi.php @@ -73,28 +73,28 @@ class BasicApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'cmsPagesV3LandingPagesCursor' => [ + 'getLandingPageFoldersWithCursor' => [ 'application/json', ], - 'cmsPagesV3LandingPagesCursorQuery' => [ + 'getLandingPagesWithCursor' => [ 'application/json', ], - 'cmsPagesV3LandingPagesFoldersCursor' => [ + 'getPreviousVersion' => [ 'application/json', ], - 'cmsPagesV3LandingPagesFoldersCursorQuery' => [ + 'getPreviousVersions' => [ 'application/json', ], - 'cmsPagesV3SitePagesCursor' => [ + 'getSitePagesWithCursor' => [ 'application/json', ], - 'cmsPagesV3SitePagesCursorQuery' => [ + 'queryLandingPageFoldersWithCursor' => [ 'application/json', ], - 'getPreviousVersion' => [ + 'queryLandingPagesWithCursor' => [ 'application/json', ], - 'getPreviousVersions' => [ + 'querySitePagesWithCursor' => [ 'application/json', ], 'resetDraft' => [ @@ -152,7 +152,7 @@ public function getConfig() } /** - * Operation cmsPagesV3LandingPagesCursor + * Operation getLandingPageFoldersWithCursor * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -165,20 +165,20 @@ public function getConfig() * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesCursor'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLandingPageFoldersWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object|\HubSpot\Client\Cms\Pages\Model\Error */ - public function cmsPagesV3LandingPagesCursor($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesCursor'][0]) + public function getLandingPageFoldersWithCursor($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getLandingPageFoldersWithCursor'][0]) { - list($response) = $this->cmsPagesV3LandingPagesCursorWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getLandingPageFoldersWithCursorWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $response; } /** - * Operation cmsPagesV3LandingPagesCursorWithHttpInfo + * Operation getLandingPageFoldersWithCursorWithHttpInfo * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -191,15 +191,15 @@ public function cmsPagesV3LandingPagesCursor($after = null, $archived = null, $c * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesCursor'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLandingPageFoldersWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsPagesV3LandingPagesCursorWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesCursor'][0]) + public function getLandingPageFoldersWithCursorWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getLandingPageFoldersWithCursor'][0]) { - $request = $this->cmsPagesV3LandingPagesCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getLandingPageFoldersWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); try { $options = $this->createHttpClientOption(); @@ -285,7 +285,7 @@ public function cmsPagesV3LandingPagesCursorWithHttpInfo($after = null, $archive } /** - * Operation cmsPagesV3LandingPagesCursorAsync + * Operation getLandingPageFoldersWithCursorAsync * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -298,14 +298,14 @@ public function cmsPagesV3LandingPagesCursorWithHttpInfo($after = null, $archive * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesCursor'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLandingPageFoldersWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3LandingPagesCursorAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesCursor'][0]) + public function getLandingPageFoldersWithCursorAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getLandingPageFoldersWithCursor'][0]) { - return $this->cmsPagesV3LandingPagesCursorAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getLandingPageFoldersWithCursorAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) ->then( function ($response) { return $response[0]; @@ -314,7 +314,7 @@ function ($response) { } /** - * Operation cmsPagesV3LandingPagesCursorAsyncWithHttpInfo + * Operation getLandingPageFoldersWithCursorAsyncWithHttpInfo * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -327,15 +327,15 @@ function ($response) { * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesCursor'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLandingPageFoldersWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3LandingPagesCursorAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesCursor'][0]) + public function getLandingPageFoldersWithCursorAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getLandingPageFoldersWithCursor'][0]) { $returnType = 'object'; - $request = $this->cmsPagesV3LandingPagesCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getLandingPageFoldersWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -374,7 +374,7 @@ function ($exception) { } /** - * Create request for operation 'cmsPagesV3LandingPagesCursor' + * Create request for operation 'getLandingPageFoldersWithCursor' * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -387,12 +387,12 @@ function ($exception) { * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesCursor'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLandingPageFoldersWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsPagesV3LandingPagesCursorRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesCursor'][0]) + public function getLandingPageFoldersWithCursorRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getLandingPageFoldersWithCursor'][0]) { @@ -407,7 +407,7 @@ public function cmsPagesV3LandingPagesCursorRequest($after = null, $archived = n - $resourcePath = '/cms/pages/v3/landing-pages/cursor'; + $resourcePath = '/cms/pages/v3/landing-pages/folders/cursor'; $formParams = []; $queryParams = []; $headerParams = []; @@ -575,7 +575,7 @@ public function cmsPagesV3LandingPagesCursorRequest($after = null, $archived = n } /** - * Operation cmsPagesV3LandingPagesCursorQuery + * Operation getLandingPagesWithCursor * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -588,20 +588,20 @@ public function cmsPagesV3LandingPagesCursorRequest($after = null, $archived = n * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesCursorQuery'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLandingPagesWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object|\HubSpot\Client\Cms\Pages\Model\Error */ - public function cmsPagesV3LandingPagesCursorQuery($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesCursorQuery'][0]) + public function getLandingPagesWithCursor($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getLandingPagesWithCursor'][0]) { - list($response) = $this->cmsPagesV3LandingPagesCursorQueryWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getLandingPagesWithCursorWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $response; } /** - * Operation cmsPagesV3LandingPagesCursorQueryWithHttpInfo + * Operation getLandingPagesWithCursorWithHttpInfo * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -614,15 +614,15 @@ public function cmsPagesV3LandingPagesCursorQuery($after = null, $archived = nul * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesCursorQuery'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLandingPagesWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsPagesV3LandingPagesCursorQueryWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesCursorQuery'][0]) + public function getLandingPagesWithCursorWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getLandingPagesWithCursor'][0]) { - $request = $this->cmsPagesV3LandingPagesCursorQueryRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getLandingPagesWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); try { $options = $this->createHttpClientOption(); @@ -708,7 +708,7 @@ public function cmsPagesV3LandingPagesCursorQueryWithHttpInfo($after = null, $ar } /** - * Operation cmsPagesV3LandingPagesCursorQueryAsync + * Operation getLandingPagesWithCursorAsync * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -721,14 +721,14 @@ public function cmsPagesV3LandingPagesCursorQueryWithHttpInfo($after = null, $ar * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesCursorQuery'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLandingPagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3LandingPagesCursorQueryAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesCursorQuery'][0]) + public function getLandingPagesWithCursorAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getLandingPagesWithCursor'][0]) { - return $this->cmsPagesV3LandingPagesCursorQueryAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getLandingPagesWithCursorAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) ->then( function ($response) { return $response[0]; @@ -737,7 +737,7 @@ function ($response) { } /** - * Operation cmsPagesV3LandingPagesCursorQueryAsyncWithHttpInfo + * Operation getLandingPagesWithCursorAsyncWithHttpInfo * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -750,15 +750,15 @@ function ($response) { * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesCursorQuery'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLandingPagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3LandingPagesCursorQueryAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesCursorQuery'][0]) + public function getLandingPagesWithCursorAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getLandingPagesWithCursor'][0]) { $returnType = 'object'; - $request = $this->cmsPagesV3LandingPagesCursorQueryRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getLandingPagesWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -797,7 +797,7 @@ function ($exception) { } /** - * Create request for operation 'cmsPagesV3LandingPagesCursorQuery' + * Create request for operation 'getLandingPagesWithCursor' * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -810,12 +810,12 @@ function ($exception) { * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesCursorQuery'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLandingPagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsPagesV3LandingPagesCursorQueryRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesCursorQuery'][0]) + public function getLandingPagesWithCursorRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getLandingPagesWithCursor'][0]) { @@ -830,7 +830,7 @@ public function cmsPagesV3LandingPagesCursorQueryRequest($after = null, $archive - $resourcePath = '/cms/pages/v3/landing-pages/cursor/query'; + $resourcePath = '/cms/pages/v3/landing-pages/cursor'; $formParams = []; $queryParams = []; $headerParams = []; @@ -998,54 +998,40 @@ public function cmsPagesV3LandingPagesCursorQueryRequest($after = null, $archive } /** - * Operation cmsPagesV3LandingPagesFoldersCursor + * Operation getPreviousVersion * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string|null $property (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesFoldersCursor'] to see the possible values for this operation + * Retrieve a previous version of a website page + * + * @param string $object_id The ID of the website page. (required) + * @param string $revision_id The ID of the specific version to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersion'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object|\HubSpot\Client\Cms\Pages\Model\Error + * @return \HubSpot\Client\Cms\Pages\Model\PageVersion|\HubSpot\Client\Cms\Pages\Model\Error */ - public function cmsPagesV3LandingPagesFoldersCursor($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesFoldersCursor'][0]) + public function getPreviousVersion($object_id, $revision_id, string $contentType = self::contentTypes['getPreviousVersion'][0]) { - list($response) = $this->cmsPagesV3LandingPagesFoldersCursorWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getPreviousVersionWithHttpInfo($object_id, $revision_id, $contentType); return $response; } /** - * Operation cmsPagesV3LandingPagesFoldersCursorWithHttpInfo + * Operation getPreviousVersionWithHttpInfo * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string|null $property (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesFoldersCursor'] to see the possible values for this operation + * Retrieve a previous version of a website page + * + * @param string $object_id The ID of the website page. (required) + * @param string $revision_id The ID of the specific version to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersion'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Cms\Pages\Model\PageVersion|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsPagesV3LandingPagesFoldersCursorWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesFoldersCursor'][0]) + public function getPreviousVersionWithHttpInfo($object_id, $revision_id, string $contentType = self::contentTypes['getPreviousVersion'][0]) { - $request = $this->cmsPagesV3LandingPagesFoldersCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPreviousVersionRequest($object_id, $revision_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1073,7 +1059,7 @@ public function cmsPagesV3LandingPagesFoldersCursorWithHttpInfo($after = null, $ switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\HubSpot\Client\Cms\Pages\Model\PageVersion', $request, $response, ); @@ -1101,7 +1087,7 @@ public function cmsPagesV3LandingPagesFoldersCursorWithHttpInfo($after = null, $ } return $this->handleResponseWithDataType( - 'object', + '\HubSpot\Client\Cms\Pages\Model\PageVersion', $request, $response, ); @@ -1110,7 +1096,7 @@ public function cmsPagesV3LandingPagesFoldersCursorWithHttpInfo($after = null, $ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\HubSpot\Client\Cms\Pages\Model\PageVersion', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1131,27 +1117,20 @@ public function cmsPagesV3LandingPagesFoldersCursorWithHttpInfo($after = null, $ } /** - * Operation cmsPagesV3LandingPagesFoldersCursorAsync + * Operation getPreviousVersionAsync * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string|null $property (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesFoldersCursor'] to see the possible values for this operation + * Retrieve a previous version of a website page + * + * @param string $object_id The ID of the website page. (required) + * @param string $revision_id The ID of the specific version to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3LandingPagesFoldersCursorAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesFoldersCursor'][0]) + public function getPreviousVersionAsync($object_id, $revision_id, string $contentType = self::contentTypes['getPreviousVersion'][0]) { - return $this->cmsPagesV3LandingPagesFoldersCursorAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getPreviousVersionAsyncWithHttpInfo($object_id, $revision_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1160,28 +1139,21 @@ function ($response) { } /** - * Operation cmsPagesV3LandingPagesFoldersCursorAsyncWithHttpInfo + * Operation getPreviousVersionAsyncWithHttpInfo * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string|null $property (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesFoldersCursor'] to see the possible values for this operation + * Retrieve a previous version of a website page + * + * @param string $object_id The ID of the website page. (required) + * @param string $revision_id The ID of the specific version to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3LandingPagesFoldersCursorAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesFoldersCursor'][0]) + public function getPreviousVersionAsyncWithHttpInfo($object_id, $revision_id, string $contentType = self::contentTypes['getPreviousVersion'][0]) { - $returnType = 'object'; - $request = $this->cmsPagesV3LandingPagesFoldersCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $returnType = '\HubSpot\Client\Cms\Pages\Model\PageVersion'; + $request = $this->getPreviousVersionRequest($object_id, $revision_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1220,147 +1192,58 @@ function ($exception) { } /** - * Create request for operation 'cmsPagesV3LandingPagesFoldersCursor' + * Create request for operation 'getPreviousVersion' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string|null $property (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesFoldersCursor'] to see the possible values for this operation + * @param string $object_id The ID of the website page. (required) + * @param string $revision_id The ID of the specific version to retrieve. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsPagesV3LandingPagesFoldersCursorRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesFoldersCursor'][0]) + public function getPreviousVersionRequest($object_id, $revision_id, string $contentType = self::contentTypes['getPreviousVersion'][0]) { + // verify the required parameter 'object_id' is set + if ($object_id === null || (is_array($object_id) && count($object_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $object_id when calling getPreviousVersion' + ); + } + // verify the required parameter 'revision_id' is set + if ($revision_id === null || (is_array($revision_id) && count($revision_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $revision_id when calling getPreviousVersion' + ); + } - - - - - - - - - - $resourcePath = '/cms/pages/v3/landing-pages/folders/cursor'; + $resourcePath = '/cms/v3/pages/site-pages/{objectId}/revisions/{revisionId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_after, - 'createdAfter', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $property, - 'property', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($object_id !== null) { + $resourcePath = str_replace( + '{' . 'objectId' . '}', + ObjectSerializer::toPathValue($object_id), + $resourcePath + ); + } + // path params + if ($revision_id !== null) { + $resourcePath = str_replace( + '{' . 'revisionId' . '}', + ObjectSerializer::toPathValue($revision_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -1421,54 +1304,44 @@ public function cmsPagesV3LandingPagesFoldersCursorRequest($after = null, $archi } /** - * Operation cmsPagesV3LandingPagesFoldersCursorQuery + * Operation getPreviousVersions + * + * Retrieve all previous versions of a website page * + * @param string $object_id The ID of the website page. (required) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string|null $property (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesFoldersCursorQuery'] to see the possible values for this operation + * @param string|null $before The cursor token value to retrieve the set of results before the current page. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return object|\HubSpot\Client\Cms\Pages\Model\Error + * @return \HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion|\HubSpot\Client\Cms\Pages\Model\Error */ - public function cmsPagesV3LandingPagesFoldersCursorQuery($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesFoldersCursorQuery'][0]) + public function getPreviousVersions($object_id, $after = null, $before = null, $limit = null, string $contentType = self::contentTypes['getPreviousVersions'][0]) { - list($response) = $this->cmsPagesV3LandingPagesFoldersCursorQueryWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getPreviousVersionsWithHttpInfo($object_id, $after, $before, $limit, $contentType); return $response; } /** - * Operation cmsPagesV3LandingPagesFoldersCursorQueryWithHttpInfo + * Operation getPreviousVersionsWithHttpInfo * + * Retrieve all previous versions of a website page + * + * @param string $object_id The ID of the website page. (required) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string|null $property (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesFoldersCursorQuery'] to see the possible values for this operation + * @param string|null $before The cursor token value to retrieve the set of results before the current page. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of object|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsPagesV3LandingPagesFoldersCursorQueryWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesFoldersCursorQuery'][0]) + public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $before = null, $limit = null, string $contentType = self::contentTypes['getPreviousVersions'][0]) { - $request = $this->cmsPagesV3LandingPagesFoldersCursorQueryRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPreviousVersionsRequest($object_id, $after, $before, $limit, $contentType); try { $options = $this->createHttpClientOption(); @@ -1496,7 +1369,7 @@ public function cmsPagesV3LandingPagesFoldersCursorQueryWithHttpInfo($after = nu switch($statusCode) { case 200: return $this->handleResponseWithDataType( - 'object', + '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion', $request, $response, ); @@ -1524,7 +1397,7 @@ public function cmsPagesV3LandingPagesFoldersCursorQueryWithHttpInfo($after = nu } return $this->handleResponseWithDataType( - 'object', + '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion', $request, $response, ); @@ -1533,7 +1406,7 @@ public function cmsPagesV3LandingPagesFoldersCursorQueryWithHttpInfo($after = nu case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - 'object', + '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1554,27 +1427,22 @@ public function cmsPagesV3LandingPagesFoldersCursorQueryWithHttpInfo($after = nu } /** - * Operation cmsPagesV3LandingPagesFoldersCursorQueryAsync + * Operation getPreviousVersionsAsync + * + * Retrieve all previous versions of a website page * + * @param string $object_id The ID of the website page. (required) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string|null $property (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesFoldersCursorQuery'] to see the possible values for this operation + * @param string|null $before The cursor token value to retrieve the set of results before the current page. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3LandingPagesFoldersCursorQueryAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesFoldersCursorQuery'][0]) + public function getPreviousVersionsAsync($object_id, $after = null, $before = null, $limit = null, string $contentType = self::contentTypes['getPreviousVersions'][0]) { - return $this->cmsPagesV3LandingPagesFoldersCursorQueryAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getPreviousVersionsAsyncWithHttpInfo($object_id, $after, $before, $limit, $contentType) ->then( function ($response) { return $response[0]; @@ -1583,28 +1451,23 @@ function ($response) { } /** - * Operation cmsPagesV3LandingPagesFoldersCursorQueryAsyncWithHttpInfo + * Operation getPreviousVersionsAsyncWithHttpInfo + * + * Retrieve all previous versions of a website page * + * @param string $object_id The ID of the website page. (required) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string|null $property (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesFoldersCursorQuery'] to see the possible values for this operation + * @param string|null $before The cursor token value to retrieve the set of results before the current page. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3LandingPagesFoldersCursorQueryAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesFoldersCursorQuery'][0]) + public function getPreviousVersionsAsyncWithHttpInfo($object_id, $after = null, $before = null, $limit = null, string $contentType = self::contentTypes['getPreviousVersions'][0]) { - $returnType = 'object'; - $request = $this->cmsPagesV3LandingPagesFoldersCursorQueryRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $returnType = '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion'; + $request = $this->getPreviousVersionsRequest($object_id, $after, $before, $limit, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1643,40 +1506,32 @@ function ($exception) { } /** - * Create request for operation 'cmsPagesV3LandingPagesFoldersCursorQuery' + * Create request for operation 'getPreviousVersions' * + * @param string $object_id The ID of the website page. (required) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string|null $property (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3LandingPagesFoldersCursorQuery'] to see the possible values for this operation + * @param string|null $before The cursor token value to retrieve the set of results before the current page. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsPagesV3LandingPagesFoldersCursorQueryRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3LandingPagesFoldersCursorQuery'][0]) + public function getPreviousVersionsRequest($object_id, $after = null, $before = null, $limit = null, string $contentType = self::contentTypes['getPreviousVersions'][0]) { + // verify the required parameter 'object_id' is set + if ($object_id === null || (is_array($object_id) && count($object_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $object_id when calling getPreviousVersions' + ); + } - - - - - - - - $resourcePath = '/cms/pages/v3/landing-pages/folders/cursor/query'; + $resourcePath = '/cms/v3/pages/site-pages/{objectId}/revisions'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1694,35 +1549,8 @@ public function cmsPagesV3LandingPagesFoldersCursorQueryRequest($after = null, $ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_after, - 'createdAfter', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name + $before, + 'before', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1737,53 +1565,16 @@ public function cmsPagesV3LandingPagesFoldersCursorQueryRequest($after = null, $ true, // explode false // required ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $property, - 'property', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($object_id !== null) { + $resourcePath = str_replace( + '{' . 'objectId' . '}', + ObjectSerializer::toPathValue($object_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -1844,7 +1635,7 @@ public function cmsPagesV3LandingPagesFoldersCursorQueryRequest($after = null, $ } /** - * Operation cmsPagesV3SitePagesCursor + * Operation getSitePagesWithCursor * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -1857,20 +1648,20 @@ public function cmsPagesV3LandingPagesFoldersCursorQueryRequest($after = null, $ * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3SitePagesCursor'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSitePagesWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object|\HubSpot\Client\Cms\Pages\Model\Error */ - public function cmsPagesV3SitePagesCursor($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3SitePagesCursor'][0]) + public function getSitePagesWithCursor($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getSitePagesWithCursor'][0]) { - list($response) = $this->cmsPagesV3SitePagesCursorWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getSitePagesWithCursorWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $response; } /** - * Operation cmsPagesV3SitePagesCursorWithHttpInfo + * Operation getSitePagesWithCursorWithHttpInfo * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -1883,15 +1674,15 @@ public function cmsPagesV3SitePagesCursor($after = null, $archived = null, $crea * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3SitePagesCursor'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSitePagesWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsPagesV3SitePagesCursorWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3SitePagesCursor'][0]) + public function getSitePagesWithCursorWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getSitePagesWithCursor'][0]) { - $request = $this->cmsPagesV3SitePagesCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getSitePagesWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); try { $options = $this->createHttpClientOption(); @@ -1977,7 +1768,7 @@ public function cmsPagesV3SitePagesCursorWithHttpInfo($after = null, $archived = } /** - * Operation cmsPagesV3SitePagesCursorAsync + * Operation getSitePagesWithCursorAsync * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -1990,14 +1781,14 @@ public function cmsPagesV3SitePagesCursorWithHttpInfo($after = null, $archived = * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3SitePagesCursor'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSitePagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3SitePagesCursorAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3SitePagesCursor'][0]) + public function getSitePagesWithCursorAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getSitePagesWithCursor'][0]) { - return $this->cmsPagesV3SitePagesCursorAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getSitePagesWithCursorAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) ->then( function ($response) { return $response[0]; @@ -2006,7 +1797,7 @@ function ($response) { } /** - * Operation cmsPagesV3SitePagesCursorAsyncWithHttpInfo + * Operation getSitePagesWithCursorAsyncWithHttpInfo * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -2019,15 +1810,15 @@ function ($response) { * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3SitePagesCursor'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSitePagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3SitePagesCursorAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3SitePagesCursor'][0]) + public function getSitePagesWithCursorAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getSitePagesWithCursor'][0]) { $returnType = 'object'; - $request = $this->cmsPagesV3SitePagesCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getSitePagesWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2066,7 +1857,7 @@ function ($exception) { } /** - * Create request for operation 'cmsPagesV3SitePagesCursor' + * Create request for operation 'getSitePagesWithCursor' * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -2079,12 +1870,12 @@ function ($exception) { * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3SitePagesCursor'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSitePagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsPagesV3SitePagesCursorRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3SitePagesCursor'][0]) + public function getSitePagesWithCursorRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getSitePagesWithCursor'][0]) { @@ -2267,7 +2058,7 @@ public function cmsPagesV3SitePagesCursorRequest($after = null, $archived = null } /** - * Operation cmsPagesV3SitePagesCursorQuery + * Operation queryLandingPageFoldersWithCursor * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -2280,20 +2071,20 @@ public function cmsPagesV3SitePagesCursorRequest($after = null, $archived = null * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3SitePagesCursorQuery'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queryLandingPageFoldersWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return object|\HubSpot\Client\Cms\Pages\Model\Error */ - public function cmsPagesV3SitePagesCursorQuery($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3SitePagesCursorQuery'][0]) + public function queryLandingPageFoldersWithCursor($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['queryLandingPageFoldersWithCursor'][0]) { - list($response) = $this->cmsPagesV3SitePagesCursorQueryWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->queryLandingPageFoldersWithCursorWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $response; } /** - * Operation cmsPagesV3SitePagesCursorQueryWithHttpInfo + * Operation queryLandingPageFoldersWithCursorWithHttpInfo * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -2306,15 +2097,15 @@ public function cmsPagesV3SitePagesCursorQuery($after = null, $archived = null, * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3SitePagesCursorQuery'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queryLandingPageFoldersWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of object|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsPagesV3SitePagesCursorQueryWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3SitePagesCursorQuery'][0]) + public function queryLandingPageFoldersWithCursorWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['queryLandingPageFoldersWithCursor'][0]) { - $request = $this->cmsPagesV3SitePagesCursorQueryRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->queryLandingPageFoldersWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); try { $options = $this->createHttpClientOption(); @@ -2400,7 +2191,7 @@ public function cmsPagesV3SitePagesCursorQueryWithHttpInfo($after = null, $archi } /** - * Operation cmsPagesV3SitePagesCursorQueryAsync + * Operation queryLandingPageFoldersWithCursorAsync * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -2413,14 +2204,14 @@ public function cmsPagesV3SitePagesCursorQueryWithHttpInfo($after = null, $archi * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3SitePagesCursorQuery'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queryLandingPageFoldersWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3SitePagesCursorQueryAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3SitePagesCursorQuery'][0]) + public function queryLandingPageFoldersWithCursorAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['queryLandingPageFoldersWithCursor'][0]) { - return $this->cmsPagesV3SitePagesCursorQueryAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->queryLandingPageFoldersWithCursorAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) ->then( function ($response) { return $response[0]; @@ -2429,7 +2220,7 @@ function ($response) { } /** - * Operation cmsPagesV3SitePagesCursorQueryAsyncWithHttpInfo + * Operation queryLandingPageFoldersWithCursorAsyncWithHttpInfo * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -2442,15 +2233,15 @@ function ($response) { * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3SitePagesCursorQuery'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queryLandingPageFoldersWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsPagesV3SitePagesCursorQueryAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3SitePagesCursorQuery'][0]) + public function queryLandingPageFoldersWithCursorAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['queryLandingPageFoldersWithCursor'][0]) { $returnType = 'object'; - $request = $this->cmsPagesV3SitePagesCursorQueryRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->queryLandingPageFoldersWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2489,7 +2280,7 @@ function ($exception) { } /** - * Create request for operation 'cmsPagesV3SitePagesCursorQuery' + * Create request for operation 'queryLandingPageFoldersWithCursor' * * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param bool|null $archived Whether to return only results that have been archived. (optional) @@ -2502,12 +2293,12 @@ function ($exception) { * @param \DateTime|null $updated_after (optional) * @param \DateTime|null $updated_at (optional) * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsPagesV3SitePagesCursorQuery'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queryLandingPageFoldersWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsPagesV3SitePagesCursorQueryRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsPagesV3SitePagesCursorQuery'][0]) + public function queryLandingPageFoldersWithCursorRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['queryLandingPageFoldersWithCursor'][0]) { @@ -2522,7 +2313,7 @@ public function cmsPagesV3SitePagesCursorQueryRequest($after = null, $archived = - $resourcePath = '/cms/pages/v3/site-pages/cursor/query'; + $resourcePath = '/cms/pages/v3/landing-pages/folders/cursor/query'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2690,40 +2481,54 @@ public function cmsPagesV3SitePagesCursorQueryRequest($after = null, $archived = } /** - * Operation getPreviousVersion + * Operation queryLandingPagesWithCursor * - * Retrieve a previous version of a website page - * - * @param string $object_id The ID of the website page. (required) - * @param string $revision_id The ID of the specific version to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersion'] to see the possible values for this operation + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_before (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $property (optional) + * @param string[]|null $sort (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_before (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queryLandingPagesWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Cms\Pages\Model\PageVersion|\HubSpot\Client\Cms\Pages\Model\Error + * @return object|\HubSpot\Client\Cms\Pages\Model\Error */ - public function getPreviousVersion($object_id, $revision_id, string $contentType = self::contentTypes['getPreviousVersion'][0]) + public function queryLandingPagesWithCursor($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['queryLandingPagesWithCursor'][0]) { - list($response) = $this->getPreviousVersionWithHttpInfo($object_id, $revision_id, $contentType); + list($response) = $this->queryLandingPagesWithCursorWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $response; } /** - * Operation getPreviousVersionWithHttpInfo - * - * Retrieve a previous version of a website page + * Operation queryLandingPagesWithCursorWithHttpInfo * - * @param string $object_id The ID of the website page. (required) - * @param string $revision_id The ID of the specific version to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersion'] to see the possible values for this operation + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_before (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $property (optional) + * @param string[]|null $sort (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_before (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queryLandingPagesWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Cms\Pages\Model\PageVersion|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of object|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPreviousVersionWithHttpInfo($object_id, $revision_id, string $contentType = self::contentTypes['getPreviousVersion'][0]) + public function queryLandingPagesWithCursorWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['queryLandingPagesWithCursor'][0]) { - $request = $this->getPreviousVersionRequest($object_id, $revision_id, $contentType); + $request = $this->queryLandingPagesWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); try { $options = $this->createHttpClientOption(); @@ -2751,7 +2556,7 @@ public function getPreviousVersionWithHttpInfo($object_id, $revision_id, string switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\Pages\Model\PageVersion', + 'object', $request, $response, ); @@ -2779,7 +2584,7 @@ public function getPreviousVersionWithHttpInfo($object_id, $revision_id, string } return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\Pages\Model\PageVersion', + 'object', $request, $response, ); @@ -2788,7 +2593,7 @@ public function getPreviousVersionWithHttpInfo($object_id, $revision_id, string case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Cms\Pages\Model\PageVersion', + 'object', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2809,20 +2614,27 @@ public function getPreviousVersionWithHttpInfo($object_id, $revision_id, string } /** - * Operation getPreviousVersionAsync + * Operation queryLandingPagesWithCursorAsync * - * Retrieve a previous version of a website page - * - * @param string $object_id The ID of the website page. (required) - * @param string $revision_id The ID of the specific version to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersion'] to see the possible values for this operation - * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Promise\PromiseInterface + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_before (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $property (optional) + * @param string[]|null $sort (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_before (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queryLandingPagesWithCursor'] to see the possible values for this operation + * + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPreviousVersionAsync($object_id, $revision_id, string $contentType = self::contentTypes['getPreviousVersion'][0]) + public function queryLandingPagesWithCursorAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['queryLandingPagesWithCursor'][0]) { - return $this->getPreviousVersionAsyncWithHttpInfo($object_id, $revision_id, $contentType) + return $this->queryLandingPagesWithCursorAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) ->then( function ($response) { return $response[0]; @@ -2831,21 +2643,28 @@ function ($response) { } /** - * Operation getPreviousVersionAsyncWithHttpInfo - * - * Retrieve a previous version of a website page + * Operation queryLandingPagesWithCursorAsyncWithHttpInfo * - * @param string $object_id The ID of the website page. (required) - * @param string $revision_id The ID of the specific version to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersion'] to see the possible values for this operation + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_before (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $property (optional) + * @param string[]|null $sort (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_before (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queryLandingPagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPreviousVersionAsyncWithHttpInfo($object_id, $revision_id, string $contentType = self::contentTypes['getPreviousVersion'][0]) + public function queryLandingPagesWithCursorAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['queryLandingPagesWithCursor'][0]) { - $returnType = '\HubSpot\Client\Cms\Pages\Model\PageVersion'; - $request = $this->getPreviousVersionRequest($object_id, $revision_id, $contentType); + $returnType = 'object'; + $request = $this->queryLandingPagesWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2884,58 +2703,147 @@ function ($exception) { } /** - * Create request for operation 'getPreviousVersion' + * Create request for operation 'queryLandingPagesWithCursor' * - * @param string $object_id The ID of the website page. (required) - * @param string $revision_id The ID of the specific version to retrieve. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersion'] to see the possible values for this operation + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_before (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $property (optional) + * @param string[]|null $sort (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_before (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['queryLandingPagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPreviousVersionRequest($object_id, $revision_id, string $contentType = self::contentTypes['getPreviousVersion'][0]) + public function queryLandingPagesWithCursorRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['queryLandingPagesWithCursor'][0]) { - // verify the required parameter 'object_id' is set - if ($object_id === null || (is_array($object_id) && count($object_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $object_id when calling getPreviousVersion' - ); - } - // verify the required parameter 'revision_id' is set - if ($revision_id === null || (is_array($revision_id) && count($revision_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $revision_id when calling getPreviousVersion' - ); - } - $resourcePath = '/cms/v3/pages/site-pages/{objectId}/revisions/{revisionId}'; + + + + + + + + + + $resourcePath = '/cms/pages/v3/landing-pages/cursor/query'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_after, + 'createdAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_at, + 'createdAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_before, + 'createdBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $property, + 'property', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sort, + 'sort', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_at, + 'updatedAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_before, + 'updatedBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - // path params - if ($object_id !== null) { - $resourcePath = str_replace( - '{' . 'objectId' . '}', - ObjectSerializer::toPathValue($object_id), - $resourcePath - ); - } - // path params - if ($revision_id !== null) { - $resourcePath = str_replace( - '{' . 'revisionId' . '}', - ObjectSerializer::toPathValue($revision_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -2996,44 +2904,54 @@ public function getPreviousVersionRequest($object_id, $revision_id, string $cont } /** - * Operation getPreviousVersions - * - * Retrieve all previous versions of a website page + * Operation querySitePagesWithCursor * - * @param string $object_id The ID of the website page. (required) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param string|null $before The cursor token value to retrieve the set of results before the current page. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_before (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $property (optional) + * @param string[]|null $sort (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_before (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['querySitePagesWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion|\HubSpot\Client\Cms\Pages\Model\Error + * @return object|\HubSpot\Client\Cms\Pages\Model\Error */ - public function getPreviousVersions($object_id, $after = null, $before = null, $limit = null, string $contentType = self::contentTypes['getPreviousVersions'][0]) + public function querySitePagesWithCursor($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['querySitePagesWithCursor'][0]) { - list($response) = $this->getPreviousVersionsWithHttpInfo($object_id, $after, $before, $limit, $contentType); + list($response) = $this->querySitePagesWithCursorWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $response; } /** - * Operation getPreviousVersionsWithHttpInfo + * Operation querySitePagesWithCursorWithHttpInfo * - * Retrieve all previous versions of a website page - * - * @param string $object_id The ID of the website page. (required) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param string|null $before The cursor token value to retrieve the set of results before the current page. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_before (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $property (optional) + * @param string[]|null $sort (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_before (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['querySitePagesWithCursor'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of object|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $before = null, $limit = null, string $contentType = self::contentTypes['getPreviousVersions'][0]) + public function querySitePagesWithCursorWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['querySitePagesWithCursor'][0]) { - $request = $this->getPreviousVersionsRequest($object_id, $after, $before, $limit, $contentType); + $request = $this->querySitePagesWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); try { $options = $this->createHttpClientOption(); @@ -3061,7 +2979,7 @@ public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $befo switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion', + 'object', $request, $response, ); @@ -3089,7 +3007,7 @@ public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $befo } return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion', + 'object', $request, $response, ); @@ -3098,7 +3016,7 @@ public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $befo case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion', + 'object', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3119,22 +3037,27 @@ public function getPreviousVersionsWithHttpInfo($object_id, $after = null, $befo } /** - * Operation getPreviousVersionsAsync - * - * Retrieve all previous versions of a website page + * Operation querySitePagesWithCursorAsync * - * @param string $object_id The ID of the website page. (required) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param string|null $before The cursor token value to retrieve the set of results before the current page. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_before (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $property (optional) + * @param string[]|null $sort (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_before (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['querySitePagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPreviousVersionsAsync($object_id, $after = null, $before = null, $limit = null, string $contentType = self::contentTypes['getPreviousVersions'][0]) + public function querySitePagesWithCursorAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['querySitePagesWithCursor'][0]) { - return $this->getPreviousVersionsAsyncWithHttpInfo($object_id, $after, $before, $limit, $contentType) + return $this->querySitePagesWithCursorAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) ->then( function ($response) { return $response[0]; @@ -3143,23 +3066,28 @@ function ($response) { } /** - * Operation getPreviousVersionsAsyncWithHttpInfo + * Operation querySitePagesWithCursorAsyncWithHttpInfo * - * Retrieve all previous versions of a website page - * - * @param string $object_id The ID of the website page. (required) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param string|null $before The cursor token value to retrieve the set of results before the current page. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_before (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $property (optional) + * @param string[]|null $sort (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_before (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['querySitePagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPreviousVersionsAsyncWithHttpInfo($object_id, $after = null, $before = null, $limit = null, string $contentType = self::contentTypes['getPreviousVersions'][0]) + public function querySitePagesWithCursorAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['querySitePagesWithCursor'][0]) { - $returnType = '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageVersion'; - $request = $this->getPreviousVersionsRequest($object_id, $after, $before, $limit, $contentType); + $returnType = 'object'; + $request = $this->querySitePagesWithCursorRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3198,32 +3126,40 @@ function ($exception) { } /** - * Create request for operation 'getPreviousVersions' + * Create request for operation 'querySitePagesWithCursor' * - * @param string $object_id The ID of the website page. (required) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param string|null $before The cursor token value to retrieve the set of results before the current page. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPreviousVersions'] to see the possible values for this operation + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_before (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param string|null $property (optional) + * @param string[]|null $sort (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_before (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['querySitePagesWithCursor'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPreviousVersionsRequest($object_id, $after = null, $before = null, $limit = null, string $contentType = self::contentTypes['getPreviousVersions'][0]) + public function querySitePagesWithCursorRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['querySitePagesWithCursor'][0]) { - // verify the required parameter 'object_id' is set - if ($object_id === null || (is_array($object_id) && count($object_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $object_id when calling getPreviousVersions' - ); - } - $resourcePath = '/cms/v3/pages/site-pages/{objectId}/revisions'; + + + + + + + + $resourcePath = '/cms/pages/v3/site-pages/cursor/query'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3241,8 +3177,35 @@ public function getPreviousVersionsRequest($object_id, $after = null, $before = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $before, - 'before', // param base name + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_after, + 'createdAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_at, + 'createdAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_before, + 'createdBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -3257,16 +3220,53 @@ public function getPreviousVersionsRequest($object_id, $after = null, $before = true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $property, + 'property', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sort, + 'sort', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_at, + 'updatedAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_before, + 'updatedBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - // path params - if ($object_id !== null) { - $resourcePath = str_replace( - '{' . 'objectId' . '}', - ObjectSerializer::toPathValue($object_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( diff --git a/codegen/Cms/Pages/Api/FoldersApi.php b/codegen/Cms/Pages/Api/FoldersApi.php index 426d2333..fd8b33f7 100644 --- a/codegen/Cms/Pages/Api/FoldersApi.php +++ b/codegen/Cms/Pages/Api/FoldersApi.php @@ -1636,26 +1636,26 @@ public function getFolderPreviousVersionsRequest($object_id, $after = null, $bef * * Get all landing page folders * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Folders. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Folders created after the specified time. (optional) * @param \DateTime|null $created_at Only return Folders created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Folders created after the specified time. (optional) * @param \DateTime|null $created_before Only return Folders created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the landing page folders to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Folders last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Folders last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Folders last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Folders last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Folders. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the landing page folders to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFoldersPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalContentFolderForwardPaging|\HubSpot\Client\Cms\Pages\Model\Error */ - public function getFoldersPage($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getFoldersPage'][0]) + public function getFoldersPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getFoldersPage'][0]) { - list($response) = $this->getFoldersPageWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getFoldersPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $response; } @@ -1664,26 +1664,26 @@ public function getFoldersPage($after = null, $archived = null, $created_after = * * Get all landing page folders * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Folders. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Folders created after the specified time. (optional) * @param \DateTime|null $created_at Only return Folders created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Folders created after the specified time. (optional) * @param \DateTime|null $created_before Only return Folders created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the landing page folders to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Folders last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Folders last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Folders last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Folders last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Folders. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the landing page folders to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFoldersPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalContentFolderForwardPaging|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getFoldersPageWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getFoldersPage'][0]) + public function getFoldersPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getFoldersPage'][0]) { - $request = $this->getFoldersPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getFoldersPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); try { $options = $this->createHttpClientOption(); @@ -1773,25 +1773,25 @@ public function getFoldersPageWithHttpInfo($after = null, $archived = null, $cre * * Get all landing page folders * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Folders. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Folders created after the specified time. (optional) * @param \DateTime|null $created_at Only return Folders created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Folders created after the specified time. (optional) * @param \DateTime|null $created_before Only return Folders created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the landing page folders to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Folders last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Folders last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Folders last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Folders last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Folders. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the landing page folders to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFoldersPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFoldersPageAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getFoldersPage'][0]) + public function getFoldersPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getFoldersPage'][0]) { - return $this->getFoldersPageAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getFoldersPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType) ->then( function ($response) { return $response[0]; @@ -1804,26 +1804,26 @@ function ($response) { * * Get all landing page folders * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Folders. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Folders created after the specified time. (optional) * @param \DateTime|null $created_at Only return Folders created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Folders created after the specified time. (optional) * @param \DateTime|null $created_before Only return Folders created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the landing page folders to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Folders last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Folders last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Folders last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Folders last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Folders. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the landing page folders to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFoldersPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getFoldersPageAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getFoldersPage'][0]) + public function getFoldersPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getFoldersPage'][0]) { $returnType = '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalContentFolderForwardPaging'; - $request = $this->getFoldersPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getFoldersPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1864,23 +1864,23 @@ function ($exception) { /** * Create request for operation 'getFoldersPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Folders. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Folders created after the specified time. (optional) * @param \DateTime|null $created_at Only return Folders created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Folders created after the specified time. (optional) * @param \DateTime|null $created_before Only return Folders created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the landing page folders to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Folders last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Folders last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Folders last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Folders last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Folders. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the landing page folders to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getFoldersPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getFoldersPageRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getFoldersPage'][0]) + public function getFoldersPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getFoldersPage'][0]) { @@ -1904,23 +1904,14 @@ public function getFoldersPageRequest($after = null, $archived = null, $created_ // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $created_at, + 'createdAt', // param base name 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $created_after, 'createdAfter', // param base name @@ -1931,8 +1922,8 @@ public function getFoldersPageRequest($after = null, $archived = null, $created_ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name + $created_before, + 'createdBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1940,8 +1931,8 @@ public function getFoldersPageRequest($after = null, $archived = null, $created_ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name + $updated_at, + 'updatedAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1949,17 +1940,17 @@ public function getFoldersPageRequest($after = null, $archived = null, $created_ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $property, - 'property', // param base name + $updated_before, + 'updatedBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1976,8 +1967,8 @@ public function getFoldersPageRequest($after = null, $archived = null, $created_ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1985,17 +1976,26 @@ public function getFoldersPageRequest($after = null, $archived = null, $created_ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $property, + 'property', // param base name 'string', // openApiType 'form', // style true, // explode diff --git a/codegen/Cms/Pages/Api/LandingPagesApi.php b/codegen/Cms/Pages/Api/LandingPagesApi.php index d38c1dca..6c89692b 100644 --- a/codegen/Cms/Pages/Api/LandingPagesApi.php +++ b/codegen/Cms/Pages/Api/LandingPagesApi.php @@ -1576,26 +1576,26 @@ public function getDraftByIdRequest($object_id, string $contentType = self::cont * * Get all landing pages * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Landing Pages. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Landing Pages created after the specified time. (optional) * @param \DateTime|null $created_at Only return Landing Pages created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Landing Pages created after the specified time. (optional) * @param \DateTime|null $created_before Only return Landing Pages created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the landing pages to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Landing Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Landing Pages last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Landing Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Landing Pages last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Landing Pages. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the landing pages to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageForwardPaging|\HubSpot\Client\Cms\Pages\Model\Error */ - public function getPage($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $response; } @@ -1604,26 +1604,26 @@ public function getPage($after = null, $archived = null, $created_after = null, * * Get all landing pages * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Landing Pages. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Landing Pages created after the specified time. (optional) * @param \DateTime|null $created_at Only return Landing Pages created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Landing Pages created after the specified time. (optional) * @param \DateTime|null $created_before Only return Landing Pages created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the landing pages to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Landing Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Landing Pages last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Landing Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Landing Pages last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Landing Pages. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the landing pages to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageForwardPaging|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); try { $options = $this->createHttpClientOption(); @@ -1713,25 +1713,25 @@ public function getPageWithHttpInfo($after = null, $archived = null, $created_af * * Get all landing pages * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Landing Pages. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Landing Pages created after the specified time. (optional) * @param \DateTime|null $created_at Only return Landing Pages created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Landing Pages created after the specified time. (optional) * @param \DateTime|null $created_before Only return Landing Pages created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the landing pages to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Landing Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Landing Pages last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Landing Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Landing Pages last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Landing Pages. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the landing pages to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType) ->then( function ($response) { return $response[0]; @@ -1744,26 +1744,26 @@ function ($response) { * * Get all landing pages * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Landing Pages. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Landing Pages created after the specified time. (optional) * @param \DateTime|null $created_at Only return Landing Pages created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Landing Pages created after the specified time. (optional) * @param \DateTime|null $created_before Only return Landing Pages created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the landing pages to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Landing Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Landing Pages last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Landing Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Landing Pages last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Landing Pages. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the landing pages to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageForwardPaging'; - $request = $this->getPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1804,23 +1804,23 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Landing Pages. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Landing Pages created after the specified time. (optional) * @param \DateTime|null $created_at Only return Landing Pages created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Landing Pages created after the specified time. (optional) * @param \DateTime|null $created_before Only return Landing Pages created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the landing pages to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Landing Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Landing Pages last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Landing Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Landing Pages last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Landing Pages. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the landing pages to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { @@ -1844,23 +1844,14 @@ public function getPageRequest($after = null, $archived = null, $created_after = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $created_at, + 'createdAt', // param base name 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $created_after, 'createdAfter', // param base name @@ -1871,8 +1862,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name + $created_before, + 'createdBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1880,8 +1871,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name + $updated_at, + 'updatedAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1889,17 +1880,17 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $property, - 'property', // param base name + $updated_before, + 'updatedBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1916,8 +1907,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1925,17 +1916,26 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $property, + 'property', // param base name 'string', // openApiType 'form', // style true, // explode diff --git a/codegen/Cms/Pages/Api/WebsitePagesApi.php b/codegen/Cms/Pages/Api/WebsitePagesApi.php index 97c7ff3c..32b9d37d 100644 --- a/codegen/Cms/Pages/Api/WebsitePagesApi.php +++ b/codegen/Cms/Pages/Api/WebsitePagesApi.php @@ -1576,26 +1576,26 @@ public function getDraftByIdRequest($object_id, string $contentType = self::cont * * Retrieve all website pages * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Site Pages. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Site Pages created after the specified time. (optional) * @param \DateTime|null $created_at Only return Site Pages created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Site Pages created after the specified time. (optional) * @param \DateTime|null $created_before Only return Site Pages created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the site pages to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Site Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Site Pages last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Site Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Site Pages last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Site Pages. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the site pages to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageForwardPaging|\HubSpot\Client\Cms\Pages\Model\Error */ - public function getPage($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->getPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $response; } @@ -1604,26 +1604,26 @@ public function getPage($after = null, $archived = null, $created_after = null, * * Retrieve all website pages * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Site Pages. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Site Pages created after the specified time. (optional) * @param \DateTime|null $created_at Only return Site Pages created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Site Pages created after the specified time. (optional) * @param \DateTime|null $created_before Only return Site Pages created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the site pages to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Site Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Site Pages last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Site Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Site Pages last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Site Pages. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the site pages to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\Pages\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageForwardPaging|\HubSpot\Client\Cms\Pages\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); try { $options = $this->createHttpClientOption(); @@ -1713,25 +1713,25 @@ public function getPageWithHttpInfo($after = null, $archived = null, $created_af * * Retrieve all website pages * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Site Pages. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Site Pages created after the specified time. (optional) * @param \DateTime|null $created_at Only return Site Pages created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Site Pages created after the specified time. (optional) * @param \DateTime|null $created_before Only return Site Pages created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the site pages to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Site Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Site Pages last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Site Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Site Pages last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Site Pages. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the site pages to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->getPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType) ->then( function ($response) { return $response[0]; @@ -1744,26 +1744,26 @@ function ($response) { * * Retrieve all website pages * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Site Pages. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Site Pages created after the specified time. (optional) * @param \DateTime|null $created_at Only return Site Pages created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Site Pages created after the specified time. (optional) * @param \DateTime|null $created_before Only return Site Pages created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the site pages to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Site Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Site Pages last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Site Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Site Pages last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Site Pages. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the site pages to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Cms\Pages\Model\CollectionResponseWithTotalPageForwardPaging'; - $request = $this->getPageRequest($after, $archived, $created_after, $created_at, $created_before, $limit, $property, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1804,23 +1804,23 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Specifies whether to return deleted Site Pages. Defaults to `false`. (optional) - * @param \DateTime|null $created_after Only return Site Pages created after the specified time. (optional) * @param \DateTime|null $created_at Only return Site Pages created at exactly the specified time. (optional) + * @param \DateTime|null $created_after Only return Site Pages created after the specified time. (optional) * @param \DateTime|null $created_before Only return Site Pages created before the specified time. (optional) - * @param int|null $limit The maximum number of results to return. Default is 100. (optional) - * @param string|null $property Specifies which properties of the site pages to include in the response. (optional) - * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) - * @param \DateTime|null $updated_after Only return Site Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_at Only return Site Pages last updated at exactly the specified time. (optional) + * @param \DateTime|null $updated_after Only return Site Pages last updated after the specified time. (optional) * @param \DateTime|null $updated_before Only return Site Pages last updated before the specified time. (optional) + * @param string[]|null $sort Specifies which fields to use for sorting results. Valid fields are `name`, `createdAt`, `updatedAt`, `createdBy`, `updatedBy`. `createdAt` will be used by default. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to return. Default is 100. (optional) + * @param bool|null $archived Specifies whether to return deleted Site Pages. Defaults to `false`. (optional) + * @param string|null $property Specifies which properties of the site pages to include in the response. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $property = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, $property = null, string $contentType = self::contentTypes['getPage'][0]) { @@ -1844,23 +1844,14 @@ public function getPageRequest($after = null, $archived = null, $created_after = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $created_at, + 'createdAt', // param base name 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $created_after, 'createdAfter', // param base name @@ -1871,8 +1862,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name + $created_before, + 'createdBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1880,8 +1871,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name + $updated_at, + 'updatedAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1889,17 +1880,17 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $property, - 'property', // param base name + $updated_before, + 'updatedBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1916,8 +1907,8 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1925,17 +1916,26 @@ public function getPageRequest($after = null, $archived = null, $created_after = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $property, + 'property', // param base name 'string', // openApiType 'form', // style true, // explode diff --git a/codegen/Cms/SiteSearch/Api/SearchApi.php b/codegen/Cms/SiteSearch/Api/SearchApi.php index 2301b50f..dcd27fa6 100644 --- a/codegen/Cms/SiteSearch/Api/SearchApi.php +++ b/codegen/Cms/SiteSearch/Api/SearchApi.php @@ -73,7 +73,7 @@ class SearchApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'cmsSiteSearchV3Search' => [ + 'search' => [ 'application/json', ], ]; @@ -125,74 +125,74 @@ public function getConfig() } /** - * Operation cmsSiteSearchV3Search + * Operation search * * Search your site * - * @param bool|null $analytics (optional) + * @param string|null $q (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param int|null $offset (optional) + * @param string|null $language (optional) + * @param bool|null $match_prefix (optional) * @param bool|null $autocomplete (optional) + * @param float|null $popularity_boost (optional) * @param float|null $boost_limit (optional) * @param string|null $boost_recent (optional) - * @param string[]|null $domain (optional) - * @param int[]|null $group_id (optional) + * @param int|null $table_id (optional) * @param string|null $hubdb_query (optional) - * @param string|null $language (optional) - * @param string|null $length (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param bool|null $match_prefix (optional) - * @param int|null $offset (optional) + * @param string[]|null $domain (optional) + * @param string[]|null $type (optional) * @param string[]|null $path_prefix (optional) - * @param float|null $popularity_boost (optional) * @param string[]|null $property (optional) - * @param string|null $q (optional) - * @param int|null $table_id (optional) - * @param string[]|null $type (optional) + * @param string|null $length (optional) + * @param int[]|null $group_id (optional) + * @param bool|null $analytics (optional) * @param string[]|null $types (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsSiteSearchV3Search'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['search'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\SiteSearch\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\SiteSearch\Model\PublicSearchResults|\HubSpot\Client\Cms\SiteSearch\Model\Error */ - public function cmsSiteSearchV3Search($analytics = null, $autocomplete = null, $boost_limit = null, $boost_recent = null, $domain = null, $group_id = null, $hubdb_query = null, $language = null, $length = null, $limit = null, $match_prefix = null, $offset = null, $path_prefix = null, $popularity_boost = null, $property = null, $q = null, $table_id = null, $type = null, $types = null, string $contentType = self::contentTypes['cmsSiteSearchV3Search'][0]) + public function search($q = null, $limit = null, $offset = null, $language = null, $match_prefix = null, $autocomplete = null, $popularity_boost = null, $boost_limit = null, $boost_recent = null, $table_id = null, $hubdb_query = null, $domain = null, $type = null, $path_prefix = null, $property = null, $length = null, $group_id = null, $analytics = null, $types = null, string $contentType = self::contentTypes['search'][0]) { - list($response) = $this->cmsSiteSearchV3SearchWithHttpInfo($analytics, $autocomplete, $boost_limit, $boost_recent, $domain, $group_id, $hubdb_query, $language, $length, $limit, $match_prefix, $offset, $path_prefix, $popularity_boost, $property, $q, $table_id, $type, $types, $contentType); + list($response) = $this->searchWithHttpInfo($q, $limit, $offset, $language, $match_prefix, $autocomplete, $popularity_boost, $boost_limit, $boost_recent, $table_id, $hubdb_query, $domain, $type, $path_prefix, $property, $length, $group_id, $analytics, $types, $contentType); return $response; } /** - * Operation cmsSiteSearchV3SearchWithHttpInfo + * Operation searchWithHttpInfo * * Search your site * - * @param bool|null $analytics (optional) + * @param string|null $q (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param int|null $offset (optional) + * @param string|null $language (optional) + * @param bool|null $match_prefix (optional) * @param bool|null $autocomplete (optional) + * @param float|null $popularity_boost (optional) * @param float|null $boost_limit (optional) * @param string|null $boost_recent (optional) - * @param string[]|null $domain (optional) - * @param int[]|null $group_id (optional) + * @param int|null $table_id (optional) * @param string|null $hubdb_query (optional) - * @param string|null $language (optional) - * @param string|null $length (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param bool|null $match_prefix (optional) - * @param int|null $offset (optional) + * @param string[]|null $domain (optional) + * @param string[]|null $type (optional) * @param string[]|null $path_prefix (optional) - * @param float|null $popularity_boost (optional) * @param string[]|null $property (optional) - * @param string|null $q (optional) - * @param int|null $table_id (optional) - * @param string[]|null $type (optional) + * @param string|null $length (optional) + * @param int[]|null $group_id (optional) + * @param bool|null $analytics (optional) * @param string[]|null $types (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsSiteSearchV3Search'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['search'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\SiteSearch\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\SiteSearch\Model\PublicSearchResults|\HubSpot\Client\Cms\SiteSearch\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsSiteSearchV3SearchWithHttpInfo($analytics = null, $autocomplete = null, $boost_limit = null, $boost_recent = null, $domain = null, $group_id = null, $hubdb_query = null, $language = null, $length = null, $limit = null, $match_prefix = null, $offset = null, $path_prefix = null, $popularity_boost = null, $property = null, $q = null, $table_id = null, $type = null, $types = null, string $contentType = self::contentTypes['cmsSiteSearchV3Search'][0]) + public function searchWithHttpInfo($q = null, $limit = null, $offset = null, $language = null, $match_prefix = null, $autocomplete = null, $popularity_boost = null, $boost_limit = null, $boost_recent = null, $table_id = null, $hubdb_query = null, $domain = null, $type = null, $path_prefix = null, $property = null, $length = null, $group_id = null, $analytics = null, $types = null, string $contentType = self::contentTypes['search'][0]) { - $request = $this->cmsSiteSearchV3SearchRequest($analytics, $autocomplete, $boost_limit, $boost_recent, $domain, $group_id, $hubdb_query, $language, $length, $limit, $match_prefix, $offset, $path_prefix, $popularity_boost, $property, $q, $table_id, $type, $types, $contentType); + $request = $this->searchRequest($q, $limit, $offset, $language, $match_prefix, $autocomplete, $popularity_boost, $boost_limit, $boost_recent, $table_id, $hubdb_query, $domain, $type, $path_prefix, $property, $length, $group_id, $analytics, $types, $contentType); try { $options = $this->createHttpClientOption(); @@ -278,37 +278,37 @@ public function cmsSiteSearchV3SearchWithHttpInfo($analytics = null, $autocomple } /** - * Operation cmsSiteSearchV3SearchAsync + * Operation searchAsync * * Search your site * - * @param bool|null $analytics (optional) + * @param string|null $q (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param int|null $offset (optional) + * @param string|null $language (optional) + * @param bool|null $match_prefix (optional) * @param bool|null $autocomplete (optional) + * @param float|null $popularity_boost (optional) * @param float|null $boost_limit (optional) * @param string|null $boost_recent (optional) - * @param string[]|null $domain (optional) - * @param int[]|null $group_id (optional) + * @param int|null $table_id (optional) * @param string|null $hubdb_query (optional) - * @param string|null $language (optional) - * @param string|null $length (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param bool|null $match_prefix (optional) - * @param int|null $offset (optional) + * @param string[]|null $domain (optional) + * @param string[]|null $type (optional) * @param string[]|null $path_prefix (optional) - * @param float|null $popularity_boost (optional) * @param string[]|null $property (optional) - * @param string|null $q (optional) - * @param int|null $table_id (optional) - * @param string[]|null $type (optional) + * @param string|null $length (optional) + * @param int[]|null $group_id (optional) + * @param bool|null $analytics (optional) * @param string[]|null $types (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsSiteSearchV3Search'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['search'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsSiteSearchV3SearchAsync($analytics = null, $autocomplete = null, $boost_limit = null, $boost_recent = null, $domain = null, $group_id = null, $hubdb_query = null, $language = null, $length = null, $limit = null, $match_prefix = null, $offset = null, $path_prefix = null, $popularity_boost = null, $property = null, $q = null, $table_id = null, $type = null, $types = null, string $contentType = self::contentTypes['cmsSiteSearchV3Search'][0]) + public function searchAsync($q = null, $limit = null, $offset = null, $language = null, $match_prefix = null, $autocomplete = null, $popularity_boost = null, $boost_limit = null, $boost_recent = null, $table_id = null, $hubdb_query = null, $domain = null, $type = null, $path_prefix = null, $property = null, $length = null, $group_id = null, $analytics = null, $types = null, string $contentType = self::contentTypes['search'][0]) { - return $this->cmsSiteSearchV3SearchAsyncWithHttpInfo($analytics, $autocomplete, $boost_limit, $boost_recent, $domain, $group_id, $hubdb_query, $language, $length, $limit, $match_prefix, $offset, $path_prefix, $popularity_boost, $property, $q, $table_id, $type, $types, $contentType) + return $this->searchAsyncWithHttpInfo($q, $limit, $offset, $language, $match_prefix, $autocomplete, $popularity_boost, $boost_limit, $boost_recent, $table_id, $hubdb_query, $domain, $type, $path_prefix, $property, $length, $group_id, $analytics, $types, $contentType) ->then( function ($response) { return $response[0]; @@ -317,38 +317,38 @@ function ($response) { } /** - * Operation cmsSiteSearchV3SearchAsyncWithHttpInfo + * Operation searchAsyncWithHttpInfo * * Search your site * - * @param bool|null $analytics (optional) + * @param string|null $q (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param int|null $offset (optional) + * @param string|null $language (optional) + * @param bool|null $match_prefix (optional) * @param bool|null $autocomplete (optional) + * @param float|null $popularity_boost (optional) * @param float|null $boost_limit (optional) * @param string|null $boost_recent (optional) - * @param string[]|null $domain (optional) - * @param int[]|null $group_id (optional) + * @param int|null $table_id (optional) * @param string|null $hubdb_query (optional) - * @param string|null $language (optional) - * @param string|null $length (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param bool|null $match_prefix (optional) - * @param int|null $offset (optional) + * @param string[]|null $domain (optional) + * @param string[]|null $type (optional) * @param string[]|null $path_prefix (optional) - * @param float|null $popularity_boost (optional) * @param string[]|null $property (optional) - * @param string|null $q (optional) - * @param int|null $table_id (optional) - * @param string[]|null $type (optional) + * @param string|null $length (optional) + * @param int[]|null $group_id (optional) + * @param bool|null $analytics (optional) * @param string[]|null $types (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsSiteSearchV3Search'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['search'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsSiteSearchV3SearchAsyncWithHttpInfo($analytics = null, $autocomplete = null, $boost_limit = null, $boost_recent = null, $domain = null, $group_id = null, $hubdb_query = null, $language = null, $length = null, $limit = null, $match_prefix = null, $offset = null, $path_prefix = null, $popularity_boost = null, $property = null, $q = null, $table_id = null, $type = null, $types = null, string $contentType = self::contentTypes['cmsSiteSearchV3Search'][0]) + public function searchAsyncWithHttpInfo($q = null, $limit = null, $offset = null, $language = null, $match_prefix = null, $autocomplete = null, $popularity_boost = null, $boost_limit = null, $boost_recent = null, $table_id = null, $hubdb_query = null, $domain = null, $type = null, $path_prefix = null, $property = null, $length = null, $group_id = null, $analytics = null, $types = null, string $contentType = self::contentTypes['search'][0]) { $returnType = '\HubSpot\Client\Cms\SiteSearch\Model\PublicSearchResults'; - $request = $this->cmsSiteSearchV3SearchRequest($analytics, $autocomplete, $boost_limit, $boost_recent, $domain, $group_id, $hubdb_query, $language, $length, $limit, $match_prefix, $offset, $path_prefix, $popularity_boost, $property, $q, $table_id, $type, $types, $contentType); + $request = $this->searchRequest($q, $limit, $offset, $language, $match_prefix, $autocomplete, $popularity_boost, $boost_limit, $boost_recent, $table_id, $hubdb_query, $domain, $type, $path_prefix, $property, $length, $group_id, $analytics, $types, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -387,33 +387,33 @@ function ($exception) { } /** - * Create request for operation 'cmsSiteSearchV3Search' + * Create request for operation 'search' * - * @param bool|null $analytics (optional) + * @param string|null $q (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param int|null $offset (optional) + * @param string|null $language (optional) + * @param bool|null $match_prefix (optional) * @param bool|null $autocomplete (optional) + * @param float|null $popularity_boost (optional) * @param float|null $boost_limit (optional) * @param string|null $boost_recent (optional) - * @param string[]|null $domain (optional) - * @param int[]|null $group_id (optional) + * @param int|null $table_id (optional) * @param string|null $hubdb_query (optional) - * @param string|null $language (optional) - * @param string|null $length (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param bool|null $match_prefix (optional) - * @param int|null $offset (optional) + * @param string[]|null $domain (optional) + * @param string[]|null $type (optional) * @param string[]|null $path_prefix (optional) - * @param float|null $popularity_boost (optional) * @param string[]|null $property (optional) - * @param string|null $q (optional) - * @param int|null $table_id (optional) - * @param string[]|null $type (optional) + * @param string|null $length (optional) + * @param int[]|null $group_id (optional) + * @param bool|null $analytics (optional) * @param string[]|null $types (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsSiteSearchV3Search'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['search'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsSiteSearchV3SearchRequest($analytics = null, $autocomplete = null, $boost_limit = null, $boost_recent = null, $domain = null, $group_id = null, $hubdb_query = null, $language = null, $length = null, $limit = null, $match_prefix = null, $offset = null, $path_prefix = null, $popularity_boost = null, $property = null, $q = null, $table_id = null, $type = null, $types = null, string $contentType = self::contentTypes['cmsSiteSearchV3Search'][0]) + public function searchRequest($q = null, $limit = null, $offset = null, $language = null, $match_prefix = null, $autocomplete = null, $popularity_boost = null, $boost_limit = null, $boost_recent = null, $table_id = null, $hubdb_query = null, $domain = null, $type = null, $path_prefix = null, $property = null, $length = null, $group_id = null, $analytics = null, $types = null, string $contentType = self::contentTypes['search'][0]) { @@ -445,35 +445,35 @@ public function cmsSiteSearchV3SearchRequest($analytics = null, $autocomplete = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $analytics, - 'analytics', // param base name - 'boolean', // openApiType + $q, + 'q', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $autocomplete, - 'autocomplete', // param base name - 'boolean', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $boost_limit, - 'boostLimit', // param base name - 'number', // openApiType + $offset, + 'offset', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $boost_recent, - 'boostRecent', // param base name + $language, + 'language', // param base name 'string', // openApiType 'form', // style true, // explode @@ -481,44 +481,44 @@ public function cmsSiteSearchV3SearchRequest($analytics = null, $autocomplete = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $domain, - 'domain', // param base name - 'array', // openApiType + $match_prefix, + 'matchPrefix', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $group_id, - 'groupId', // param base name - 'array', // openApiType + $autocomplete, + 'autocomplete', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $hubdb_query, - 'hubdbQuery', // param base name - 'string', // openApiType + $popularity_boost, + 'popularityBoost', // param base name + 'number', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $language, - 'language', // param base name - 'string', // openApiType + $boost_limit, + 'boostLimit', // param base name + 'number', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $length, - 'length', // param base name + $boost_recent, + 'boostRecent', // param base name 'string', // openApiType 'form', // style true, // explode @@ -526,8 +526,8 @@ public function cmsSiteSearchV3SearchRequest($analytics = null, $autocomplete = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name + $table_id, + 'tableId', // param base name 'integer', // openApiType 'form', // style true, // explode @@ -535,26 +535,26 @@ public function cmsSiteSearchV3SearchRequest($analytics = null, $autocomplete = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $match_prefix, - 'matchPrefix', // param base name - 'boolean', // openApiType + $hubdb_query, + 'hubdbQuery', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $offset, - 'offset', // param base name - 'integer', // openApiType + $domain, + 'domain', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $path_prefix, - 'pathPrefix', // param base name + $type, + 'type', // param base name 'array', // openApiType 'form', // style true, // explode @@ -562,9 +562,9 @@ public function cmsSiteSearchV3SearchRequest($analytics = null, $autocomplete = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $popularity_boost, - 'popularityBoost', // param base name - 'number', // openApiType + $path_prefix, + 'pathPrefix', // param base name + 'array', // openApiType 'form', // style true, // explode false // required @@ -580,8 +580,8 @@ public function cmsSiteSearchV3SearchRequest($analytics = null, $autocomplete = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $q, - 'q', // param base name + $length, + 'length', // param base name 'string', // openApiType 'form', // style true, // explode @@ -589,18 +589,18 @@ public function cmsSiteSearchV3SearchRequest($analytics = null, $autocomplete = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $table_id, - 'tableId', // param base name - 'integer', // openApiType + $group_id, + 'groupId', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $type, - 'type', // param base name - 'array', // openApiType + $analytics, + 'analytics', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Cms/UrlRedirects/Api/BasicApi.php b/codegen/Cms/UrlRedirects/Api/BasicApi.php index 9271ef9d..310784e2 100644 --- a/codegen/Cms/UrlRedirects/Api/BasicApi.php +++ b/codegen/Cms/UrlRedirects/Api/BasicApi.php @@ -76,13 +76,13 @@ class BasicApi 'archive' => [ 'application/json', ], - 'cmsUrlRedirectsV3' => [ + 'create' => [ 'application/json', ], - 'cmsUrlRedirectsV3_0' => [ + 'getById' => [ 'application/json', ], - 'getById' => [ + 'getPage' => [ 'application/json', ], 'update' => [ @@ -367,52 +367,34 @@ public function archiveRequest($url_redirect_id, string $contentType = self::con } /** - * Operation cmsUrlRedirectsV3 + * Operation create * - * @param string|null $after after (optional) - * @param bool|null $archived archived (optional) - * @param \DateTime|null $created_after created_after (optional) - * @param \DateTime|null $created_at created_at (optional) - * @param \DateTime|null $created_before created_before (optional) - * @param int|null $limit limit (optional) - * @param string[]|null $sort sort (optional) - * @param \DateTime|null $updated_after updated_after (optional) - * @param \DateTime|null $updated_at updated_at (optional) - * @param \DateTime|null $updated_before updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsUrlRedirectsV3'] to see the possible values for this operation + * @param \HubSpot\Client\Cms\UrlRedirects\Model\UrlMappingCreateRequestBody $url_mapping_create_request_body url_mapping_create_request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\UrlRedirects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging|\HubSpot\Client\Cms\UrlRedirects\Model\Error + * @return \HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping|\HubSpot\Client\Cms\UrlRedirects\Model\Error */ - public function cmsUrlRedirectsV3($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsUrlRedirectsV3'][0]) + public function create($url_mapping_create_request_body, string $contentType = self::contentTypes['create'][0]) { - list($response) = $this->cmsUrlRedirectsV3WithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + list($response) = $this->createWithHttpInfo($url_mapping_create_request_body, $contentType); return $response; } /** - * Operation cmsUrlRedirectsV3WithHttpInfo + * Operation createWithHttpInfo * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsUrlRedirectsV3'] to see the possible values for this operation + * @param \HubSpot\Client\Cms\UrlRedirects\Model\UrlMappingCreateRequestBody $url_mapping_create_request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\UrlRedirects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging|\HubSpot\Client\Cms\UrlRedirects\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping|\HubSpot\Client\Cms\UrlRedirects\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsUrlRedirectsV3WithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsUrlRedirectsV3'][0]) + public function createWithHttpInfo($url_mapping_create_request_body, string $contentType = self::contentTypes['create'][0]) { - $request = $this->cmsUrlRedirectsV3Request($after, $archived, $created_after, $created_at, $created_before, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $request = $this->createRequest($url_mapping_create_request_body, $contentType); try { $options = $this->createHttpClientOption(); @@ -438,9 +420,9 @@ public function cmsUrlRedirectsV3WithHttpInfo($after = null, $archived = null, $ switch($statusCode) { - case 200: + case 201: return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging', + '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping', $request, $response, ); @@ -468,16 +450,16 @@ public function cmsUrlRedirectsV3WithHttpInfo($after = null, $archived = null, $ } return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging', + '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging', + '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -498,26 +480,17 @@ public function cmsUrlRedirectsV3WithHttpInfo($after = null, $archived = null, $ } /** - * Operation cmsUrlRedirectsV3Async + * Operation createAsync * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsUrlRedirectsV3'] to see the possible values for this operation + * @param \HubSpot\Client\Cms\UrlRedirects\Model\UrlMappingCreateRequestBody $url_mapping_create_request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsUrlRedirectsV3Async($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsUrlRedirectsV3'][0]) + public function createAsync($url_mapping_create_request_body, string $contentType = self::contentTypes['create'][0]) { - return $this->cmsUrlRedirectsV3AsyncWithHttpInfo($after, $archived, $created_after, $created_at, $created_before, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType) + return $this->createAsyncWithHttpInfo($url_mapping_create_request_body, $contentType) ->then( function ($response) { return $response[0]; @@ -526,27 +499,18 @@ function ($response) { } /** - * Operation cmsUrlRedirectsV3AsyncWithHttpInfo + * Operation createAsyncWithHttpInfo * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsUrlRedirectsV3'] to see the possible values for this operation + * @param \HubSpot\Client\Cms\UrlRedirects\Model\UrlMappingCreateRequestBody $url_mapping_create_request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsUrlRedirectsV3AsyncWithHttpInfo($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsUrlRedirectsV3'][0]) + public function createAsyncWithHttpInfo($url_mapping_create_request_body, string $contentType = self::contentTypes['create'][0]) { - $returnType = '\HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging'; - $request = $this->cmsUrlRedirectsV3Request($after, $archived, $created_after, $created_at, $created_before, $limit, $sort, $updated_after, $updated_at, $updated_before, $contentType); + $returnType = '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping'; + $request = $this->createRequest($url_mapping_create_request_body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -585,35 +549,23 @@ function ($exception) { } /** - * Create request for operation 'cmsUrlRedirectsV3' + * Create request for operation 'create' * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param int|null $limit (optional) - * @param string[]|null $sort (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsUrlRedirectsV3'] to see the possible values for this operation + * @param \HubSpot\Client\Cms\UrlRedirects\Model\UrlMappingCreateRequestBody $url_mapping_create_request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsUrlRedirectsV3Request($after = null, $archived = null, $created_after = null, $created_at = null, $created_before = null, $limit = null, $sort = null, $updated_after = null, $updated_at = null, $updated_before = null, string $contentType = self::contentTypes['cmsUrlRedirectsV3'][0]) + public function createRequest($url_mapping_create_request_body, string $contentType = self::contentTypes['create'][0]) { - - - - - - - - - + // verify the required parameter 'url_mapping_create_request_body' is set + if ($url_mapping_create_request_body === null || (is_array($url_mapping_create_request_body) && count($url_mapping_create_request_body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $url_mapping_create_request_body when calling create' + ); + } $resourcePath = '/cms/url-redirects/v3'; @@ -623,96 +575,6 @@ public function cmsUrlRedirectsV3Request($after = null, $archived = null, $creat $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_after, - 'createdAfter', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); @@ -724,7 +586,14 @@ public function cmsUrlRedirectsV3Request($after = null, $archived = null, $creat ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($url_mapping_create_request_body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($url_mapping_create_request_body), JSON_THROW_ON_ERROR); + } else { + $httpBody = $url_mapping_create_request_body; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -767,7 +636,7 @@ public function cmsUrlRedirectsV3Request($after = null, $archived = null, $creat $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -775,34 +644,38 @@ public function cmsUrlRedirectsV3Request($after = null, $archived = null, $creat } /** - * Operation cmsUrlRedirectsV3_0 + * Operation getById * - * @param \HubSpot\Client\Cms\UrlRedirects\Model\UrlMappingCreateRequestBody $url_mapping_create_request_body url_mapping_create_request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsUrlRedirectsV3_0'] to see the possible values for this operation + * Get details for a redirect + * + * @param string $url_redirect_id The ID of the target redirect. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\UrlRedirects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping|\HubSpot\Client\Cms\UrlRedirects\Model\Error */ - public function cmsUrlRedirectsV3_0($url_mapping_create_request_body, string $contentType = self::contentTypes['cmsUrlRedirectsV3_0'][0]) + public function getById($url_redirect_id, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->cmsUrlRedirectsV3_0WithHttpInfo($url_mapping_create_request_body, $contentType); + list($response) = $this->getByIdWithHttpInfo($url_redirect_id, $contentType); return $response; } /** - * Operation cmsUrlRedirectsV3_0WithHttpInfo + * Operation getByIdWithHttpInfo * - * @param \HubSpot\Client\Cms\UrlRedirects\Model\UrlMappingCreateRequestBody $url_mapping_create_request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsUrlRedirectsV3_0'] to see the possible values for this operation + * Get details for a redirect + * + * @param string $url_redirect_id The ID of the target redirect. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\UrlRedirects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping|\HubSpot\Client\Cms\UrlRedirects\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function cmsUrlRedirectsV3_0WithHttpInfo($url_mapping_create_request_body, string $contentType = self::contentTypes['cmsUrlRedirectsV3_0'][0]) + public function getByIdWithHttpInfo($url_redirect_id, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->cmsUrlRedirectsV3_0Request($url_mapping_create_request_body, $contentType); + $request = $this->getByIdRequest($url_redirect_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -828,7 +701,7 @@ public function cmsUrlRedirectsV3_0WithHttpInfo($url_mapping_create_request_body switch($statusCode) { - case 201: + case 200: return $this->handleResponseWithDataType( '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping', $request, @@ -864,7 +737,7 @@ public function cmsUrlRedirectsV3_0WithHttpInfo($url_mapping_create_request_body ); } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping', @@ -888,17 +761,19 @@ public function cmsUrlRedirectsV3_0WithHttpInfo($url_mapping_create_request_body } /** - * Operation cmsUrlRedirectsV3_0Async + * Operation getByIdAsync * - * @param \HubSpot\Client\Cms\UrlRedirects\Model\UrlMappingCreateRequestBody $url_mapping_create_request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsUrlRedirectsV3_0'] to see the possible values for this operation + * Get details for a redirect + * + * @param string $url_redirect_id The ID of the target redirect. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsUrlRedirectsV3_0Async($url_mapping_create_request_body, string $contentType = self::contentTypes['cmsUrlRedirectsV3_0'][0]) + public function getByIdAsync($url_redirect_id, string $contentType = self::contentTypes['getById'][0]) { - return $this->cmsUrlRedirectsV3_0AsyncWithHttpInfo($url_mapping_create_request_body, $contentType) + return $this->getByIdAsyncWithHttpInfo($url_redirect_id, $contentType) ->then( function ($response) { return $response[0]; @@ -907,18 +782,20 @@ function ($response) { } /** - * Operation cmsUrlRedirectsV3_0AsyncWithHttpInfo + * Operation getByIdAsyncWithHttpInfo * - * @param \HubSpot\Client\Cms\UrlRedirects\Model\UrlMappingCreateRequestBody $url_mapping_create_request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsUrlRedirectsV3_0'] to see the possible values for this operation + * Get details for a redirect + * + * @param string $url_redirect_id The ID of the target redirect. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function cmsUrlRedirectsV3_0AsyncWithHttpInfo($url_mapping_create_request_body, string $contentType = self::contentTypes['cmsUrlRedirectsV3_0'][0]) + public function getByIdAsyncWithHttpInfo($url_redirect_id, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping'; - $request = $this->cmsUrlRedirectsV3_0Request($url_mapping_create_request_body, $contentType); + $request = $this->getByIdRequest($url_redirect_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -957,26 +834,26 @@ function ($exception) { } /** - * Create request for operation 'cmsUrlRedirectsV3_0' + * Create request for operation 'getById' * - * @param \HubSpot\Client\Cms\UrlRedirects\Model\UrlMappingCreateRequestBody $url_mapping_create_request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cmsUrlRedirectsV3_0'] to see the possible values for this operation + * @param string $url_redirect_id The ID of the target redirect. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function cmsUrlRedirectsV3_0Request($url_mapping_create_request_body, string $contentType = self::contentTypes['cmsUrlRedirectsV3_0'][0]) + public function getByIdRequest($url_redirect_id, string $contentType = self::contentTypes['getById'][0]) { - // verify the required parameter 'url_mapping_create_request_body' is set - if ($url_mapping_create_request_body === null || (is_array($url_mapping_create_request_body) && count($url_mapping_create_request_body) === 0)) { + // verify the required parameter 'url_redirect_id' is set + if ($url_redirect_id === null || (is_array($url_redirect_id) && count($url_redirect_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $url_mapping_create_request_body when calling cmsUrlRedirectsV3_0' + 'Missing the required parameter $url_redirect_id when calling getById' ); } - $resourcePath = '/cms/url-redirects/v3'; + $resourcePath = '/cms/v3/url-redirects/{urlRedirectId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -985,6 +862,14 @@ public function cmsUrlRedirectsV3_0Request($url_mapping_create_request_body, str + // path params + if ($url_redirect_id !== null) { + $resourcePath = str_replace( + '{' . 'urlRedirectId' . '}', + ObjectSerializer::toPathValue($url_redirect_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -994,14 +879,7 @@ public function cmsUrlRedirectsV3_0Request($url_mapping_create_request_body, str ); // for model (json/xml) - if (isset($url_mapping_create_request_body)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($url_mapping_create_request_body), JSON_THROW_ON_ERROR); - } else { - $httpBody = $url_mapping_create_request_body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1044,7 +922,7 @@ public function cmsUrlRedirectsV3_0Request($url_mapping_create_request_body, str $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1052,38 +930,52 @@ public function cmsUrlRedirectsV3_0Request($url_mapping_create_request_body, str } /** - * Operation getById - * - * Get details for a redirect + * Operation getPage * - * @param string $url_redirect_id The ID of the target redirect. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \DateTime|null $created_at created_at (optional) + * @param \DateTime|null $created_after created_after (optional) + * @param \DateTime|null $created_before created_before (optional) + * @param \DateTime|null $updated_at updated_at (optional) + * @param \DateTime|null $updated_after updated_after (optional) + * @param \DateTime|null $updated_before updated_before (optional) + * @param string[]|null $sort sort (optional) + * @param string|null $after after (optional) + * @param int|null $limit limit (optional) + * @param bool|null $archived archived (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\UrlRedirects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping|\HubSpot\Client\Cms\UrlRedirects\Model\Error + * @return \HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging|\HubSpot\Client\Cms\UrlRedirects\Model\Error */ - public function getById($url_redirect_id, string $contentType = self::contentTypes['getById'][0]) + public function getPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getByIdWithHttpInfo($url_redirect_id, $contentType); + list($response) = $this->getPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $contentType); return $response; } /** - * Operation getByIdWithHttpInfo + * Operation getPageWithHttpInfo * - * Get details for a redirect - * - * @param string $url_redirect_id The ID of the target redirect. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Cms\UrlRedirects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping|\HubSpot\Client\Cms\UrlRedirects\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging|\HubSpot\Client\Cms\UrlRedirects\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($url_redirect_id, string $contentType = self::contentTypes['getById'][0]) + public function getPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getByIdRequest($url_redirect_id, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1111,7 +1003,7 @@ public function getByIdWithHttpInfo($url_redirect_id, string $contentType = self switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping', + '\HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging', $request, $response, ); @@ -1139,7 +1031,7 @@ public function getByIdWithHttpInfo($url_redirect_id, string $contentType = self } return $this->handleResponseWithDataType( - '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping', + '\HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging', $request, $response, ); @@ -1148,7 +1040,7 @@ public function getByIdWithHttpInfo($url_redirect_id, string $contentType = self case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping', + '\HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1169,19 +1061,26 @@ public function getByIdWithHttpInfo($url_redirect_id, string $contentType = self } /** - * Operation getByIdAsync - * - * Get details for a redirect + * Operation getPageAsync * - * @param string $url_redirect_id The ID of the target redirect. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($url_redirect_id, string $contentType = self::contentTypes['getById'][0]) + public function getPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getByIdAsyncWithHttpInfo($url_redirect_id, $contentType) + return $this->getPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1190,20 +1089,27 @@ function ($response) { } /** - * Operation getByIdAsyncWithHttpInfo - * - * Get details for a redirect + * Operation getPageAsyncWithHttpInfo * - * @param string $url_redirect_id The ID of the target redirect. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($url_redirect_id, string $contentType = self::contentTypes['getById'][0]) + public function getPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) { - $returnType = '\HubSpot\Client\Cms\UrlRedirects\Model\UrlMapping'; - $request = $this->getByIdRequest($url_redirect_id, $contentType); + $returnType = '\HubSpot\Client\Cms\UrlRedirects\Model\CollectionResponseWithTotalUrlMappingForwardPaging'; + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1242,42 +1148,136 @@ function ($exception) { } /** - * Create request for operation 'getById' + * Create request for operation 'getPage' * - * @param string $url_redirect_id The ID of the target redirect. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($url_redirect_id, string $contentType = self::contentTypes['getById'][0]) + public function getPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $archived = null, string $contentType = self::contentTypes['getPage'][0]) { - // verify the required parameter 'url_redirect_id' is set - if ($url_redirect_id === null || (is_array($url_redirect_id) && count($url_redirect_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $url_redirect_id when calling getById' - ); - } - $resourcePath = '/cms/v3/url-redirects/{urlRedirectId}'; + + + + + + + + + + $resourcePath = '/cms/url-redirects/v3'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_at, + 'createdAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_after, + 'createdAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_before, + 'createdBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_at, + 'updatedAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_before, + 'updatedBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sort, + 'sort', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - // path params - if ($url_redirect_id !== null) { - $resourcePath = str_replace( - '{' . 'urlRedirectId' . '}', - ObjectSerializer::toPathValue($url_redirect_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( diff --git a/codegen/Crm/Commerce/Invoices/Api/BasicApi.php b/codegen/Crm/Commerce/Invoices/Api/BasicApi.php index c9d759b4..9b5199c8 100644 --- a/codegen/Crm/Commerce/Invoices/Api/BasicApi.php +++ b/codegen/Crm/Commerce/Invoices/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $invoice_id invoice_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Commerce\Invoices\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Commerce\Invoices\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Commerce\Invoices\Model\Error */ - public function getById($invoice_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($invoice_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($invoice_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($invoice_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($invoice_id, $archived = false, $associations = null, $i * Read * * @param string $invoice_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Commerce\Invoices\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Commerce\Invoices\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Commerce\Invoices\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($invoice_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($invoice_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($invoice_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($invoice_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($invoice_id, $archived = false, $association * Read * * @param string $invoice_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($invoice_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($invoice_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($invoice_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($invoice_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $invoice_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($invoice_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($invoice_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Commerce\Invoices\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($invoice_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($invoice_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $invoice_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($invoice_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($invoice_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'invoice_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($invoice_id, $archived = false, $associations = n // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($invoice_id, $archived = false, $associations = n ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($invoice_id, $archived = false, $associations = n * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of invoices that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Commerce\Invoices\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Commerce\Invoices\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Commerce\Invoices\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of invoices that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Commerce\Invoices\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Commerce\Invoices\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Commerce\Invoices\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of invoices that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of invoices that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Commerce\Invoices\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of invoices that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Companies/Api/BasicApi.php b/codegen/Crm/Companies/Api/BasicApi.php index 97eed278..5ee94f51 100644 --- a/codegen/Crm/Companies/Api/BasicApi.php +++ b/codegen/Crm/Companies/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Retrieve a company * * @param string $company_id company_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Companies\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Companies\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Companies\Model\Error */ - public function getById($company_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($company_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($company_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($company_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($company_id, $archived = false, $associations = null, $i * Retrieve a company * * @param string $company_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Companies\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Companies\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Companies\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($company_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($company_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($company_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($company_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($company_id, $archived = false, $association * Retrieve a company * * @param string $company_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($company_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($company_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($company_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($company_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Retrieve a company * * @param string $company_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($company_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($company_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Companies\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($company_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($company_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $company_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($company_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($company_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'company_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($company_id, $archived = false, $associations = n // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($company_id, $archived = false, $associations = n ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($company_id, $archived = false, $associations = n * * Retrieve companies * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of companies that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Companies\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Companies\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Companies\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * Retrieve companies * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of companies that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Companies\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Companies\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Companies\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * Retrieve companies * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of companies that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * Retrieve companies * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of companies that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Companies\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of companies that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Contacts/Api/BasicApi.php b/codegen/Crm/Contacts/Api/BasicApi.php index 108ef6a5..97e52956 100644 --- a/codegen/Crm/Contacts/Api/BasicApi.php +++ b/codegen/Crm/Contacts/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Retrieve a contact * * @param string $contact_id contact_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Contacts\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Contacts\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Contacts\Model\Error */ - public function getById($contact_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($contact_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($contact_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($contact_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($contact_id, $archived = false, $associations = null, $i * Retrieve a contact * * @param string $contact_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Contacts\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Contacts\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Contacts\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($contact_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($contact_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($contact_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($contact_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($contact_id, $archived = false, $association * Retrieve a contact * * @param string $contact_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($contact_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($contact_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($contact_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($contact_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Retrieve a contact * * @param string $contact_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($contact_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($contact_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Contacts\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($contact_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($contact_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $contact_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($contact_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($contact_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'contact_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($contact_id, $archived = false, $associations = n // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($contact_id, $archived = false, $associations = n ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($contact_id, $archived = false, $associations = n * * Retrieve contacts * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of contacts that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Contacts\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Contacts\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Contacts\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * Retrieve contacts * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of contacts that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Contacts\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Contacts\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Contacts\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * Retrieve contacts * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of contacts that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * Retrieve contacts * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of contacts that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Contacts\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of contacts that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Deals/Api/BasicApi.php b/codegen/Crm/Deals/Api/BasicApi.php index 1039dc98..9cbf31e1 100644 --- a/codegen/Crm/Deals/Api/BasicApi.php +++ b/codegen/Crm/Deals/Api/BasicApi.php @@ -663,20 +663,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $deal_id deal_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Deals\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Deals\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Deals\Model\Error */ - public function getById($deal_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($deal_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($deal_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($deal_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -686,20 +686,20 @@ public function getById($deal_id, $archived = false, $associations = null, $id_p * Read * * @param string $deal_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Deals\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Deals\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Deals\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($deal_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($deal_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($deal_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($deal_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -790,19 +790,19 @@ public function getByIdWithHttpInfo($deal_id, $archived = false, $associations = * Read * * @param string $deal_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($deal_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($deal_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($deal_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($deal_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -816,20 +816,20 @@ function ($response) { * Read * * @param string $deal_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($deal_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($deal_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Deals\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($deal_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($deal_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -871,17 +871,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $deal_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($deal_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($deal_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'deal_id' is set @@ -909,17 +909,17 @@ public function getByIdRequest($deal_id, $archived = false, $associations = null // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -927,27 +927,27 @@ public function getByIdRequest($deal_id, $archived = false, $associations = null ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1026,21 +1026,21 @@ public function getByIdRequest($deal_id, $archived = false, $associations = null * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Deals\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Deals\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Deals\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1049,21 +1049,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Deals\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Deals\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Deals\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1153,20 +1153,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1179,21 +1179,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Deals\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1234,18 +1234,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1264,26 +1264,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1291,17 +1291,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1309,9 +1309,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Extensions/Calling/Api/AdvancedApi.php b/codegen/Crm/Extensions/Calling/Api/AdvancedApi.php index a61ceb5e..c4048fcd 100644 --- a/codegen/Crm/Extensions/Calling/Api/AdvancedApi.php +++ b/codegen/Crm/Extensions/Calling/Api/AdvancedApi.php @@ -73,7 +73,7 @@ class AdvancedApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmV3ExtensionsCallingInboundCall' => [ + 'createInboundCall' => [ 'application/json', ], 'markAsReady' => [ @@ -128,38 +128,38 @@ public function getConfig() } /** - * Operation crmV3ExtensionsCallingInboundCall + * Operation createInboundCall * * Submit details of an inbound call to the CRM. * * @param \HubSpot\Client\Crm\Extensions\Calling\Model\CompletedThirdPartyCallRequest $completed_third_party_call_request completed_third_party_call_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ExtensionsCallingInboundCall'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createInboundCall'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Calling\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Extensions\Calling\Model\CompletedThirdPartyCallResponse|\HubSpot\Client\Crm\Extensions\Calling\Model\Error */ - public function crmV3ExtensionsCallingInboundCall($completed_third_party_call_request, string $contentType = self::contentTypes['crmV3ExtensionsCallingInboundCall'][0]) + public function createInboundCall($completed_third_party_call_request, string $contentType = self::contentTypes['createInboundCall'][0]) { - list($response) = $this->crmV3ExtensionsCallingInboundCallWithHttpInfo($completed_third_party_call_request, $contentType); + list($response) = $this->createInboundCallWithHttpInfo($completed_third_party_call_request, $contentType); return $response; } /** - * Operation crmV3ExtensionsCallingInboundCallWithHttpInfo + * Operation createInboundCallWithHttpInfo * * Submit details of an inbound call to the CRM. * * @param \HubSpot\Client\Crm\Extensions\Calling\Model\CompletedThirdPartyCallRequest $completed_third_party_call_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ExtensionsCallingInboundCall'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createInboundCall'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Calling\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Extensions\Calling\Model\CompletedThirdPartyCallResponse|\HubSpot\Client\Crm\Extensions\Calling\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ExtensionsCallingInboundCallWithHttpInfo($completed_third_party_call_request, string $contentType = self::contentTypes['crmV3ExtensionsCallingInboundCall'][0]) + public function createInboundCallWithHttpInfo($completed_third_party_call_request, string $contentType = self::contentTypes['createInboundCall'][0]) { - $request = $this->crmV3ExtensionsCallingInboundCallRequest($completed_third_party_call_request, $contentType); + $request = $this->createInboundCallRequest($completed_third_party_call_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -245,19 +245,19 @@ public function crmV3ExtensionsCallingInboundCallWithHttpInfo($completed_third_p } /** - * Operation crmV3ExtensionsCallingInboundCallAsync + * Operation createInboundCallAsync * * Submit details of an inbound call to the CRM. * * @param \HubSpot\Client\Crm\Extensions\Calling\Model\CompletedThirdPartyCallRequest $completed_third_party_call_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ExtensionsCallingInboundCall'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createInboundCall'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ExtensionsCallingInboundCallAsync($completed_third_party_call_request, string $contentType = self::contentTypes['crmV3ExtensionsCallingInboundCall'][0]) + public function createInboundCallAsync($completed_third_party_call_request, string $contentType = self::contentTypes['createInboundCall'][0]) { - return $this->crmV3ExtensionsCallingInboundCallAsyncWithHttpInfo($completed_third_party_call_request, $contentType) + return $this->createInboundCallAsyncWithHttpInfo($completed_third_party_call_request, $contentType) ->then( function ($response) { return $response[0]; @@ -266,20 +266,20 @@ function ($response) { } /** - * Operation crmV3ExtensionsCallingInboundCallAsyncWithHttpInfo + * Operation createInboundCallAsyncWithHttpInfo * * Submit details of an inbound call to the CRM. * * @param \HubSpot\Client\Crm\Extensions\Calling\Model\CompletedThirdPartyCallRequest $completed_third_party_call_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ExtensionsCallingInboundCall'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createInboundCall'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ExtensionsCallingInboundCallAsyncWithHttpInfo($completed_third_party_call_request, string $contentType = self::contentTypes['crmV3ExtensionsCallingInboundCall'][0]) + public function createInboundCallAsyncWithHttpInfo($completed_third_party_call_request, string $contentType = self::contentTypes['createInboundCall'][0]) { $returnType = '\HubSpot\Client\Crm\Extensions\Calling\Model\CompletedThirdPartyCallResponse'; - $request = $this->crmV3ExtensionsCallingInboundCallRequest($completed_third_party_call_request, $contentType); + $request = $this->createInboundCallRequest($completed_third_party_call_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -318,21 +318,21 @@ function ($exception) { } /** - * Create request for operation 'crmV3ExtensionsCallingInboundCall' + * Create request for operation 'createInboundCall' * * @param \HubSpot\Client\Crm\Extensions\Calling\Model\CompletedThirdPartyCallRequest $completed_third_party_call_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ExtensionsCallingInboundCall'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createInboundCall'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ExtensionsCallingInboundCallRequest($completed_third_party_call_request, string $contentType = self::contentTypes['crmV3ExtensionsCallingInboundCall'][0]) + public function createInboundCallRequest($completed_third_party_call_request, string $contentType = self::contentTypes['createInboundCall'][0]) { // verify the required parameter 'completed_third_party_call_request' is set if ($completed_third_party_call_request === null || (is_array($completed_third_party_call_request) && count($completed_third_party_call_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $completed_third_party_call_request when calling crmV3ExtensionsCallingInboundCall' + 'Missing the required parameter $completed_third_party_call_request when calling createInboundCall' ); } diff --git a/codegen/Crm/Extensions/Calling/Api/BasicApi.php b/codegen/Crm/Extensions/Calling/Api/BasicApi.php index c3c79c22..8bceafb9 100644 --- a/codegen/Crm/Extensions/Calling/Api/BasicApi.php +++ b/codegen/Crm/Extensions/Calling/Api/BasicApi.php @@ -82,13 +82,13 @@ class BasicApi 'create_1' => [ 'application/json', ], - 'crmExtensionsCallingV3ConnectionStatuses' => [ + 'get' => [ 'application/json', ], - 'crmExtensionsCallingV3ConnectionStatusesMe' => [ + 'getForCurrentUser' => [ 'application/json', ], - 'get' => [ + 'getPage' => [ 'application/json', ], 'get_0' => [ @@ -1079,34 +1079,38 @@ public function create_1Request($app_id, $recording_settings_request, string $co } /** - * Operation crmExtensionsCallingV3ConnectionStatuses + * Operation get * - * @param int[]|null $user_id (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatuses'] to see the possible values for this operation + * Retrieve the calling extension settings for a specific app. + * + * @param int $app_id The unique identifier for the app whose calling extension settings are being retrieved. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['get'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Calling\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging|\HubSpot\Client\Crm\Extensions\Calling\Model\Error + * @return \HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse|\HubSpot\Client\Crm\Extensions\Calling\Model\Error */ - public function crmExtensionsCallingV3ConnectionStatuses($user_id = null, string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatuses'][0]) + public function get($app_id, string $contentType = self::contentTypes['get'][0]) { - list($response) = $this->crmExtensionsCallingV3ConnectionStatusesWithHttpInfo($user_id, $contentType); + list($response) = $this->getWithHttpInfo($app_id, $contentType); return $response; } /** - * Operation crmExtensionsCallingV3ConnectionStatusesWithHttpInfo + * Operation getWithHttpInfo * - * @param int[]|null $user_id (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatuses'] to see the possible values for this operation + * Retrieve the calling extension settings for a specific app. + * + * @param int $app_id The unique identifier for the app whose calling extension settings are being retrieved. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['get'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Calling\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging|\HubSpot\Client\Crm\Extensions\Calling\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse|\HubSpot\Client\Crm\Extensions\Calling\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmExtensionsCallingV3ConnectionStatusesWithHttpInfo($user_id = null, string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatuses'][0]) + public function getWithHttpInfo($app_id, string $contentType = self::contentTypes['get'][0]) { - $request = $this->crmExtensionsCallingV3ConnectionStatusesRequest($user_id, $contentType); + $request = $this->getRequest($app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1134,7 +1138,7 @@ public function crmExtensionsCallingV3ConnectionStatusesWithHttpInfo($user_id = switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging', + '\HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse', $request, $response, ); @@ -1162,7 +1166,7 @@ public function crmExtensionsCallingV3ConnectionStatusesWithHttpInfo($user_id = } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging', + '\HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse', $request, $response, ); @@ -1171,7 +1175,7 @@ public function crmExtensionsCallingV3ConnectionStatusesWithHttpInfo($user_id = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging', + '\HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1192,17 +1196,19 @@ public function crmExtensionsCallingV3ConnectionStatusesWithHttpInfo($user_id = } /** - * Operation crmExtensionsCallingV3ConnectionStatusesAsync + * Operation getAsync * - * @param int[]|null $user_id (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatuses'] to see the possible values for this operation + * Retrieve the calling extension settings for a specific app. + * + * @param int $app_id The unique identifier for the app whose calling extension settings are being retrieved. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['get'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmExtensionsCallingV3ConnectionStatusesAsync($user_id = null, string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatuses'][0]) + public function getAsync($app_id, string $contentType = self::contentTypes['get'][0]) { - return $this->crmExtensionsCallingV3ConnectionStatusesAsyncWithHttpInfo($user_id, $contentType) + return $this->getAsyncWithHttpInfo($app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1211,18 +1217,20 @@ function ($response) { } /** - * Operation crmExtensionsCallingV3ConnectionStatusesAsyncWithHttpInfo + * Operation getAsyncWithHttpInfo * - * @param int[]|null $user_id (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatuses'] to see the possible values for this operation + * Retrieve the calling extension settings for a specific app. + * + * @param int $app_id The unique identifier for the app whose calling extension settings are being retrieved. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['get'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmExtensionsCallingV3ConnectionStatusesAsyncWithHttpInfo($user_id = null, string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatuses'][0]) + public function getAsyncWithHttpInfo($app_id, string $contentType = self::contentTypes['get'][0]) { - $returnType = '\HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging'; - $request = $this->crmExtensionsCallingV3ConnectionStatusesRequest($user_id, $contentType); + $returnType = '\HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse'; + $request = $this->getRequest($app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1261,37 +1269,42 @@ function ($exception) { } /** - * Create request for operation 'crmExtensionsCallingV3ConnectionStatuses' + * Create request for operation 'get' * - * @param int[]|null $user_id (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatuses'] to see the possible values for this operation + * @param int $app_id The unique identifier for the app whose calling extension settings are being retrieved. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['get'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmExtensionsCallingV3ConnectionStatusesRequest($user_id = null, string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatuses'][0]) + public function getRequest($app_id, string $contentType = self::contentTypes['get'][0]) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app_id when calling get' + ); + } - $resourcePath = '/crm/extensions/calling/v3/connection-statuses'; + $resourcePath = '/crm/v3/extensions/calling/{appId}/settings'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $user_id, - 'userId', // param base name - 'array', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($app_id !== null) { + $resourcePath = str_replace( + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -1325,9 +1338,10 @@ public function crmExtensionsCallingV3ConnectionStatusesRequest($user_id = null, } } - // this endpoint requires OAuth (access token) - if (!empty($this->config->getAccessToken())) { - $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); + // this endpoint requires API key authentication + $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); + if ($apiKey !== null) { + $queryParams['hapikey'] = $apiKey; } $defaultHeaders = []; @@ -1352,32 +1366,32 @@ public function crmExtensionsCallingV3ConnectionStatusesRequest($user_id = null, } /** - * Operation crmExtensionsCallingV3ConnectionStatusesMe + * Operation getForCurrentUser * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatusesMe'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getForCurrentUser'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Calling\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Extensions\Calling\Model\UserCallingConnectionStatusResponse|\HubSpot\Client\Crm\Extensions\Calling\Model\Error */ - public function crmExtensionsCallingV3ConnectionStatusesMe(string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatusesMe'][0]) + public function getForCurrentUser(string $contentType = self::contentTypes['getForCurrentUser'][0]) { - list($response) = $this->crmExtensionsCallingV3ConnectionStatusesMeWithHttpInfo($contentType); + list($response) = $this->getForCurrentUserWithHttpInfo($contentType); return $response; } /** - * Operation crmExtensionsCallingV3ConnectionStatusesMeWithHttpInfo + * Operation getForCurrentUserWithHttpInfo * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatusesMe'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getForCurrentUser'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Calling\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Extensions\Calling\Model\UserCallingConnectionStatusResponse|\HubSpot\Client\Crm\Extensions\Calling\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmExtensionsCallingV3ConnectionStatusesMeWithHttpInfo(string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatusesMe'][0]) + public function getForCurrentUserWithHttpInfo(string $contentType = self::contentTypes['getForCurrentUser'][0]) { - $request = $this->crmExtensionsCallingV3ConnectionStatusesMeRequest($contentType); + $request = $this->getForCurrentUserRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -1463,16 +1477,16 @@ public function crmExtensionsCallingV3ConnectionStatusesMeWithHttpInfo(string $c } /** - * Operation crmExtensionsCallingV3ConnectionStatusesMeAsync + * Operation getForCurrentUserAsync * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatusesMe'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getForCurrentUser'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmExtensionsCallingV3ConnectionStatusesMeAsync(string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatusesMe'][0]) + public function getForCurrentUserAsync(string $contentType = self::contentTypes['getForCurrentUser'][0]) { - return $this->crmExtensionsCallingV3ConnectionStatusesMeAsyncWithHttpInfo($contentType) + return $this->getForCurrentUserAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -1481,17 +1495,17 @@ function ($response) { } /** - * Operation crmExtensionsCallingV3ConnectionStatusesMeAsyncWithHttpInfo + * Operation getForCurrentUserAsyncWithHttpInfo * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatusesMe'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getForCurrentUser'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmExtensionsCallingV3ConnectionStatusesMeAsyncWithHttpInfo(string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatusesMe'][0]) + public function getForCurrentUserAsyncWithHttpInfo(string $contentType = self::contentTypes['getForCurrentUser'][0]) { $returnType = '\HubSpot\Client\Crm\Extensions\Calling\Model\UserCallingConnectionStatusResponse'; - $request = $this->crmExtensionsCallingV3ConnectionStatusesMeRequest($contentType); + $request = $this->getForCurrentUserRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1530,14 +1544,14 @@ function ($exception) { } /** - * Create request for operation 'crmExtensionsCallingV3ConnectionStatusesMe' + * Create request for operation 'getForCurrentUser' * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatusesMe'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getForCurrentUser'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmExtensionsCallingV3ConnectionStatusesMeRequest(string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatusesMe'][0]) + public function getForCurrentUserRequest(string $contentType = self::contentTypes['getForCurrentUser'][0]) { @@ -1610,38 +1624,34 @@ public function crmExtensionsCallingV3ConnectionStatusesMeRequest(string $conten } /** - * Operation get - * - * Retrieve the calling extension settings for a specific app. + * Operation getPage * - * @param int $app_id The unique identifier for the app whose calling extension settings are being retrieved. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['get'] to see the possible values for this operation + * @param int[]|null $user_id (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Calling\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse|\HubSpot\Client\Crm\Extensions\Calling\Model\Error + * @return \HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging|\HubSpot\Client\Crm\Extensions\Calling\Model\Error */ - public function get($app_id, string $contentType = self::contentTypes['get'][0]) + public function getPage($user_id = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getWithHttpInfo($app_id, $contentType); + list($response) = $this->getPageWithHttpInfo($user_id, $contentType); return $response; } /** - * Operation getWithHttpInfo - * - * Retrieve the calling extension settings for a specific app. + * Operation getPageWithHttpInfo * - * @param int $app_id The unique identifier for the app whose calling extension settings are being retrieved. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['get'] to see the possible values for this operation + * @param int[]|null $user_id (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Calling\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse|\HubSpot\Client\Crm\Extensions\Calling\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging|\HubSpot\Client\Crm\Extensions\Calling\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getWithHttpInfo($app_id, string $contentType = self::contentTypes['get'][0]) + public function getPageWithHttpInfo($user_id = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getRequest($app_id, $contentType); + $request = $this->getPageRequest($user_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1669,7 +1679,7 @@ public function getWithHttpInfo($app_id, string $contentType = self::contentType switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse', + '\HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging', $request, $response, ); @@ -1697,7 +1707,7 @@ public function getWithHttpInfo($app_id, string $contentType = self::contentType } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse', + '\HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging', $request, $response, ); @@ -1706,7 +1716,7 @@ public function getWithHttpInfo($app_id, string $contentType = self::contentType case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse', + '\HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1727,19 +1737,17 @@ public function getWithHttpInfo($app_id, string $contentType = self::contentType } /** - * Operation getAsync + * Operation getPageAsync * - * Retrieve the calling extension settings for a specific app. - * - * @param int $app_id The unique identifier for the app whose calling extension settings are being retrieved. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['get'] to see the possible values for this operation + * @param int[]|null $user_id (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAsync($app_id, string $contentType = self::contentTypes['get'][0]) + public function getPageAsync($user_id = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getAsyncWithHttpInfo($app_id, $contentType) + return $this->getPageAsyncWithHttpInfo($user_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1748,20 +1756,18 @@ function ($response) { } /** - * Operation getAsyncWithHttpInfo + * Operation getPageAsyncWithHttpInfo * - * Retrieve the calling extension settings for a specific app. - * - * @param int $app_id The unique identifier for the app whose calling extension settings are being retrieved. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['get'] to see the possible values for this operation + * @param int[]|null $user_id (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAsyncWithHttpInfo($app_id, string $contentType = self::contentTypes['get'][0]) + public function getPageAsyncWithHttpInfo($user_id = null, string $contentType = self::contentTypes['getPage'][0]) { - $returnType = '\HubSpot\Client\Crm\Extensions\Calling\Model\SettingsResponse'; - $request = $this->getRequest($app_id, $contentType); + $returnType = '\HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging'; + $request = $this->getPageRequest($user_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1800,42 +1806,37 @@ function ($exception) { } /** - * Create request for operation 'get' + * Create request for operation 'getPage' * - * @param int $app_id The unique identifier for the app whose calling extension settings are being retrieved. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['get'] to see the possible values for this operation + * @param int[]|null $user_id (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getRequest($app_id, string $contentType = self::contentTypes['get'][0]) + public function getPageRequest($user_id = null, string $contentType = self::contentTypes['getPage'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling get' - ); - } - $resourcePath = '/crm/v3/extensions/calling/{appId}/settings'; + $resourcePath = '/crm/extensions/calling/v3/connection-statuses'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $user_id, + 'userId', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - // path params - if ($app_id !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -1869,10 +1870,9 @@ public function getRequest($app_id, string $contentType = self::contentTypes['ge } } - // this endpoint requires API key authentication - $apiKey = $this->config->getApiKeyWithPrefix('hapikey'); - if ($apiKey !== null) { - $queryParams['hapikey'] = $apiKey; + // this endpoint requires OAuth (access token) + if (!empty($this->config->getAccessToken())) { + $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } $defaultHeaders = []; diff --git a/codegen/Crm/Extensions/Calling/Api/BatchApi.php b/codegen/Crm/Extensions/Calling/Api/BatchApi.php index 5a2b1314..00a0cb50 100644 --- a/codegen/Crm/Extensions/Calling/Api/BatchApi.php +++ b/codegen/Crm/Extensions/Calling/Api/BatchApi.php @@ -73,7 +73,7 @@ class BatchApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmExtensionsCallingV3ConnectionStatusesBatchRead' => [ + 'read' => [ 'application/json', ], ]; @@ -125,34 +125,34 @@ public function getConfig() } /** - * Operation crmExtensionsCallingV3ConnectionStatusesBatchRead + * Operation read * * @param \HubSpot\Client\Crm\Extensions\Calling\Model\BatchInputPublicObjectId $batch_input_public_object_id batch_input_public_object_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatusesBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Calling\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging|\HubSpot\Client\Crm\Extensions\Calling\Model\Error */ - public function crmExtensionsCallingV3ConnectionStatusesBatchRead($batch_input_public_object_id, string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatusesBatchRead'][0]) + public function read($batch_input_public_object_id, string $contentType = self::contentTypes['read'][0]) { - list($response) = $this->crmExtensionsCallingV3ConnectionStatusesBatchReadWithHttpInfo($batch_input_public_object_id, $contentType); + list($response) = $this->readWithHttpInfo($batch_input_public_object_id, $contentType); return $response; } /** - * Operation crmExtensionsCallingV3ConnectionStatusesBatchReadWithHttpInfo + * Operation readWithHttpInfo * * @param \HubSpot\Client\Crm\Extensions\Calling\Model\BatchInputPublicObjectId $batch_input_public_object_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatusesBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Calling\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging|\HubSpot\Client\Crm\Extensions\Calling\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmExtensionsCallingV3ConnectionStatusesBatchReadWithHttpInfo($batch_input_public_object_id, string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatusesBatchRead'][0]) + public function readWithHttpInfo($batch_input_public_object_id, string $contentType = self::contentTypes['read'][0]) { - $request = $this->crmExtensionsCallingV3ConnectionStatusesBatchReadRequest($batch_input_public_object_id, $contentType); + $request = $this->readRequest($batch_input_public_object_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -238,17 +238,17 @@ public function crmExtensionsCallingV3ConnectionStatusesBatchReadWithHttpInfo($b } /** - * Operation crmExtensionsCallingV3ConnectionStatusesBatchReadAsync + * Operation readAsync * * @param \HubSpot\Client\Crm\Extensions\Calling\Model\BatchInputPublicObjectId $batch_input_public_object_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatusesBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmExtensionsCallingV3ConnectionStatusesBatchReadAsync($batch_input_public_object_id, string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatusesBatchRead'][0]) + public function readAsync($batch_input_public_object_id, string $contentType = self::contentTypes['read'][0]) { - return $this->crmExtensionsCallingV3ConnectionStatusesBatchReadAsyncWithHttpInfo($batch_input_public_object_id, $contentType) + return $this->readAsyncWithHttpInfo($batch_input_public_object_id, $contentType) ->then( function ($response) { return $response[0]; @@ -257,18 +257,18 @@ function ($response) { } /** - * Operation crmExtensionsCallingV3ConnectionStatusesBatchReadAsyncWithHttpInfo + * Operation readAsyncWithHttpInfo * * @param \HubSpot\Client\Crm\Extensions\Calling\Model\BatchInputPublicObjectId $batch_input_public_object_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatusesBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmExtensionsCallingV3ConnectionStatusesBatchReadAsyncWithHttpInfo($batch_input_public_object_id, string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatusesBatchRead'][0]) + public function readAsyncWithHttpInfo($batch_input_public_object_id, string $contentType = self::contentTypes['read'][0]) { $returnType = '\HubSpot\Client\Crm\Extensions\Calling\Model\CollectionResponseUserCallingConnectionStatusResponseNoPaging'; - $request = $this->crmExtensionsCallingV3ConnectionStatusesBatchReadRequest($batch_input_public_object_id, $contentType); + $request = $this->readRequest($batch_input_public_object_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -307,21 +307,21 @@ function ($exception) { } /** - * Create request for operation 'crmExtensionsCallingV3ConnectionStatusesBatchRead' + * Create request for operation 'read' * * @param \HubSpot\Client\Crm\Extensions\Calling\Model\BatchInputPublicObjectId $batch_input_public_object_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmExtensionsCallingV3ConnectionStatusesBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmExtensionsCallingV3ConnectionStatusesBatchReadRequest($batch_input_public_object_id, string $contentType = self::contentTypes['crmExtensionsCallingV3ConnectionStatusesBatchRead'][0]) + public function readRequest($batch_input_public_object_id, string $contentType = self::contentTypes['read'][0]) { // verify the required parameter 'batch_input_public_object_id' is set if ($batch_input_public_object_id === null || (is_array($batch_input_public_object_id) && count($batch_input_public_object_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $batch_input_public_object_id when calling crmExtensionsCallingV3ConnectionStatusesBatchRead' + 'Missing the required parameter $batch_input_public_object_id when calling read' ); } diff --git a/codegen/Crm/Extensions/Cards/Api/AdvancedApi.php b/codegen/Crm/Extensions/Cards/Api/AdvancedApi.php index cffc7479..84188e55 100644 --- a/codegen/Crm/Extensions/Cards/Api/AdvancedApi.php +++ b/codegen/Crm/Extensions/Cards/Api/AdvancedApi.php @@ -73,7 +73,7 @@ class AdvancedApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmV3ExtensionsCardsDevAppIdViewsMigrate' => [ + 'migrateViews' => [ 'application/json', ], ]; @@ -125,40 +125,40 @@ public function getConfig() } /** - * Operation crmV3ExtensionsCardsDevAppIdViewsMigrate + * Operation migrateViews * * Migrate Card In Views * * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param \HubSpot\Client\Crm\Extensions\Cards\Model\CardMigrateViewsRequest $card_migrate_views_request card_migrate_views_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ExtensionsCardsDevAppIdViewsMigrate'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['migrateViews'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Cards\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Extensions\Cards\Model\CardMigrateViewsResponse|\HubSpot\Client\Crm\Extensions\Cards\Model\Error */ - public function crmV3ExtensionsCardsDevAppIdViewsMigrate($app_id, $card_migrate_views_request, string $contentType = self::contentTypes['crmV3ExtensionsCardsDevAppIdViewsMigrate'][0]) + public function migrateViews($app_id, $card_migrate_views_request, string $contentType = self::contentTypes['migrateViews'][0]) { - list($response) = $this->crmV3ExtensionsCardsDevAppIdViewsMigrateWithHttpInfo($app_id, $card_migrate_views_request, $contentType); + list($response) = $this->migrateViewsWithHttpInfo($app_id, $card_migrate_views_request, $contentType); return $response; } /** - * Operation crmV3ExtensionsCardsDevAppIdViewsMigrateWithHttpInfo + * Operation migrateViewsWithHttpInfo * * Migrate Card In Views * * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param \HubSpot\Client\Crm\Extensions\Cards\Model\CardMigrateViewsRequest $card_migrate_views_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ExtensionsCardsDevAppIdViewsMigrate'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['migrateViews'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Cards\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Extensions\Cards\Model\CardMigrateViewsResponse|\HubSpot\Client\Crm\Extensions\Cards\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ExtensionsCardsDevAppIdViewsMigrateWithHttpInfo($app_id, $card_migrate_views_request, string $contentType = self::contentTypes['crmV3ExtensionsCardsDevAppIdViewsMigrate'][0]) + public function migrateViewsWithHttpInfo($app_id, $card_migrate_views_request, string $contentType = self::contentTypes['migrateViews'][0]) { - $request = $this->crmV3ExtensionsCardsDevAppIdViewsMigrateRequest($app_id, $card_migrate_views_request, $contentType); + $request = $this->migrateViewsRequest($app_id, $card_migrate_views_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -244,20 +244,20 @@ public function crmV3ExtensionsCardsDevAppIdViewsMigrateWithHttpInfo($app_id, $c } /** - * Operation crmV3ExtensionsCardsDevAppIdViewsMigrateAsync + * Operation migrateViewsAsync * * Migrate Card In Views * * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param \HubSpot\Client\Crm\Extensions\Cards\Model\CardMigrateViewsRequest $card_migrate_views_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ExtensionsCardsDevAppIdViewsMigrate'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['migrateViews'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ExtensionsCardsDevAppIdViewsMigrateAsync($app_id, $card_migrate_views_request, string $contentType = self::contentTypes['crmV3ExtensionsCardsDevAppIdViewsMigrate'][0]) + public function migrateViewsAsync($app_id, $card_migrate_views_request, string $contentType = self::contentTypes['migrateViews'][0]) { - return $this->crmV3ExtensionsCardsDevAppIdViewsMigrateAsyncWithHttpInfo($app_id, $card_migrate_views_request, $contentType) + return $this->migrateViewsAsyncWithHttpInfo($app_id, $card_migrate_views_request, $contentType) ->then( function ($response) { return $response[0]; @@ -266,21 +266,21 @@ function ($response) { } /** - * Operation crmV3ExtensionsCardsDevAppIdViewsMigrateAsyncWithHttpInfo + * Operation migrateViewsAsyncWithHttpInfo * * Migrate Card In Views * * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param \HubSpot\Client\Crm\Extensions\Cards\Model\CardMigrateViewsRequest $card_migrate_views_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ExtensionsCardsDevAppIdViewsMigrate'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['migrateViews'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ExtensionsCardsDevAppIdViewsMigrateAsyncWithHttpInfo($app_id, $card_migrate_views_request, string $contentType = self::contentTypes['crmV3ExtensionsCardsDevAppIdViewsMigrate'][0]) + public function migrateViewsAsyncWithHttpInfo($app_id, $card_migrate_views_request, string $contentType = self::contentTypes['migrateViews'][0]) { $returnType = '\HubSpot\Client\Crm\Extensions\Cards\Model\CardMigrateViewsResponse'; - $request = $this->crmV3ExtensionsCardsDevAppIdViewsMigrateRequest($app_id, $card_migrate_views_request, $contentType); + $request = $this->migrateViewsRequest($app_id, $card_migrate_views_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -319,29 +319,29 @@ function ($exception) { } /** - * Create request for operation 'crmV3ExtensionsCardsDevAppIdViewsMigrate' + * Create request for operation 'migrateViews' * * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param \HubSpot\Client\Crm\Extensions\Cards\Model\CardMigrateViewsRequest $card_migrate_views_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ExtensionsCardsDevAppIdViewsMigrate'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['migrateViews'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ExtensionsCardsDevAppIdViewsMigrateRequest($app_id, $card_migrate_views_request, string $contentType = self::contentTypes['crmV3ExtensionsCardsDevAppIdViewsMigrate'][0]) + public function migrateViewsRequest($app_id, $card_migrate_views_request, string $contentType = self::contentTypes['migrateViews'][0]) { // verify the required parameter 'app_id' is set if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling crmV3ExtensionsCardsDevAppIdViewsMigrate' + 'Missing the required parameter $app_id when calling migrateViews' ); } // verify the required parameter 'card_migrate_views_request' is set if ($card_migrate_views_request === null || (is_array($card_migrate_views_request) && count($card_migrate_views_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $card_migrate_views_request when calling crmV3ExtensionsCardsDevAppIdViewsMigrate' + 'Missing the required parameter $card_migrate_views_request when calling migrateViews' ); } diff --git a/codegen/Crm/Extensions/Cards/Api/BasicApi.php b/codegen/Crm/Extensions/Cards/Api/BasicApi.php index 15c54ffb..eca6558c 100644 --- a/codegen/Crm/Extensions/Cards/Api/BasicApi.php +++ b/codegen/Crm/Extensions/Cards/Api/BasicApi.php @@ -144,17 +144,17 @@ public function getConfig() * * Delete a card * - * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param string $card_id The ID of the card to delete. (required) + * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Cards\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function archive($app_id, $card_id, string $contentType = self::contentTypes['archive'][0]) + public function archive($card_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - $this->archiveWithHttpInfo($app_id, $card_id, $contentType); + $this->archiveWithHttpInfo($card_id, $app_id, $contentType); } /** @@ -162,17 +162,17 @@ public function archive($app_id, $card_id, string $contentType = self::contentTy * * Delete a card * - * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param string $card_id The ID of the card to delete. (required) + * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Cards\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveWithHttpInfo($app_id, $card_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveWithHttpInfo($card_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - $request = $this->archiveRequest($app_id, $card_id, $contentType); + $request = $this->archiveRequest($card_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -220,16 +220,16 @@ public function archiveWithHttpInfo($app_id, $card_id, string $contentType = sel * * Delete a card * - * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param string $card_id The ID of the card to delete. (required) + * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsync($app_id, $card_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsync($card_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - return $this->archiveAsyncWithHttpInfo($app_id, $card_id, $contentType) + return $this->archiveAsyncWithHttpInfo($card_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -242,17 +242,17 @@ function ($response) { * * Delete a card * - * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param string $card_id The ID of the card to delete. (required) + * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsyncWithHttpInfo($app_id, $card_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsyncWithHttpInfo($card_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { $returnType = ''; - $request = $this->archiveRequest($app_id, $card_id, $contentType); + $request = $this->archiveRequest($card_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -280,27 +280,27 @@ function ($exception) { /** * Create request for operation 'archive' * - * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param string $card_id The ID of the card to delete. (required) + * @param int $app_id The id of the app containing the Legacy CRM Card (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveRequest($app_id, $card_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveRequest($card_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'card_id' is set + if ($card_id === null || (is_array($card_id) && count($card_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling archive' + 'Missing the required parameter $card_id when calling archive' ); } - // verify the required parameter 'card_id' is set - if ($card_id === null || (is_array($card_id) && count($card_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $card_id when calling archive' + 'Missing the required parameter $app_id when calling archive' ); } @@ -315,18 +315,18 @@ public function archiveRequest($app_id, $card_id, string $contentType = self::co // path params - if ($app_id !== null) { + if ($card_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'cardId' . '}', + ObjectSerializer::toPathValue($card_id), $resourcePath ); } // path params - if ($card_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'cardId' . '}', - ObjectSerializer::toPathValue($card_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -988,17 +988,17 @@ public function getAllRequest($app_id, string $contentType = self::contentTypes[ * * Get a card. * - * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $card_id The id of the Legacy CRM Card (required) + * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Cards\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Extensions\Cards\Model\PublicCardResponse|\HubSpot\Client\Crm\Extensions\Cards\Model\Error */ - public function getById($app_id, $card_id, string $contentType = self::contentTypes['getById'][0]) + public function getById($card_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($app_id, $card_id, $contentType); + list($response) = $this->getByIdWithHttpInfo($card_id, $app_id, $contentType); return $response; } @@ -1007,17 +1007,17 @@ public function getById($app_id, $card_id, string $contentType = self::contentTy * * Get a card. * - * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $card_id The id of the Legacy CRM Card (required) + * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Extensions\Cards\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Extensions\Cards\Model\PublicCardResponse|\HubSpot\Client\Crm\Extensions\Cards\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($app_id, $card_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($card_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($app_id, $card_id, $contentType); + $request = $this->getByIdRequest($card_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1107,16 +1107,16 @@ public function getByIdWithHttpInfo($app_id, $card_id, string $contentType = sel * * Get a card. * - * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $card_id The id of the Legacy CRM Card (required) + * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($app_id, $card_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($card_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($app_id, $card_id, $contentType) + return $this->getByIdAsyncWithHttpInfo($card_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1129,17 +1129,17 @@ function ($response) { * * Get a card. * - * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $card_id The id of the Legacy CRM Card (required) + * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($app_id, $card_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($card_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Extensions\Cards\Model\PublicCardResponse'; - $request = $this->getByIdRequest($app_id, $card_id, $contentType); + $request = $this->getByIdRequest($card_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1180,27 +1180,27 @@ function ($exception) { /** * Create request for operation 'getById' * - * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $card_id The id of the Legacy CRM Card (required) + * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($app_id, $card_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($card_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'card_id' is set + if ($card_id === null || (is_array($card_id) && count($card_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getById' + 'Missing the required parameter $card_id when calling getById' ); } - // verify the required parameter 'card_id' is set - if ($card_id === null || (is_array($card_id) && count($card_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $card_id when calling getById' + 'Missing the required parameter $app_id when calling getById' ); } @@ -1215,18 +1215,18 @@ public function getByIdRequest($app_id, $card_id, string $contentType = self::co // path params - if ($app_id !== null) { + if ($card_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'cardId' . '}', + ObjectSerializer::toPathValue($card_id), $resourcePath ); } // path params - if ($card_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'cardId' . '}', - ObjectSerializer::toPathValue($card_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -1557,8 +1557,8 @@ public function getCardsSampleResponseRequest(string $contentType = self::conten * * Update a card * - * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $card_id The id of the app containing the Legacy CRM Card (required) + * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param \HubSpot\Client\Crm\Extensions\Cards\Model\CardPatchRequest $card_patch_request card_patch_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -1566,9 +1566,9 @@ public function getCardsSampleResponseRequest(string $contentType = self::conten * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Extensions\Cards\Model\PublicCardResponse|\HubSpot\Client\Crm\Extensions\Cards\Model\Error */ - public function update($app_id, $card_id, $card_patch_request, string $contentType = self::contentTypes['update'][0]) + public function update($card_id, $app_id, $card_patch_request, string $contentType = self::contentTypes['update'][0]) { - list($response) = $this->updateWithHttpInfo($app_id, $card_id, $card_patch_request, $contentType); + list($response) = $this->updateWithHttpInfo($card_id, $app_id, $card_patch_request, $contentType); return $response; } @@ -1577,8 +1577,8 @@ public function update($app_id, $card_id, $card_patch_request, string $contentTy * * Update a card * - * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $card_id The id of the app containing the Legacy CRM Card (required) + * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param \HubSpot\Client\Crm\Extensions\Cards\Model\CardPatchRequest $card_patch_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -1586,9 +1586,9 @@ public function update($app_id, $card_id, $card_patch_request, string $contentTy * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Extensions\Cards\Model\PublicCardResponse|\HubSpot\Client\Crm\Extensions\Cards\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateWithHttpInfo($app_id, $card_id, $card_patch_request, string $contentType = self::contentTypes['update'][0]) + public function updateWithHttpInfo($card_id, $app_id, $card_patch_request, string $contentType = self::contentTypes['update'][0]) { - $request = $this->updateRequest($app_id, $card_id, $card_patch_request, $contentType); + $request = $this->updateRequest($card_id, $app_id, $card_patch_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -1678,17 +1678,17 @@ public function updateWithHttpInfo($app_id, $card_id, $card_patch_request, strin * * Update a card * - * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $card_id The id of the app containing the Legacy CRM Card (required) + * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param \HubSpot\Client\Crm\Extensions\Cards\Model\CardPatchRequest $card_patch_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsync($app_id, $card_id, $card_patch_request, string $contentType = self::contentTypes['update'][0]) + public function updateAsync($card_id, $app_id, $card_patch_request, string $contentType = self::contentTypes['update'][0]) { - return $this->updateAsyncWithHttpInfo($app_id, $card_id, $card_patch_request, $contentType) + return $this->updateAsyncWithHttpInfo($card_id, $app_id, $card_patch_request, $contentType) ->then( function ($response) { return $response[0]; @@ -1701,18 +1701,18 @@ function ($response) { * * Update a card * - * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $card_id The id of the app containing the Legacy CRM Card (required) + * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param \HubSpot\Client\Crm\Extensions\Cards\Model\CardPatchRequest $card_patch_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsyncWithHttpInfo($app_id, $card_id, $card_patch_request, string $contentType = self::contentTypes['update'][0]) + public function updateAsyncWithHttpInfo($card_id, $app_id, $card_patch_request, string $contentType = self::contentTypes['update'][0]) { $returnType = '\HubSpot\Client\Crm\Extensions\Cards\Model\PublicCardResponse'; - $request = $this->updateRequest($app_id, $card_id, $card_patch_request, $contentType); + $request = $this->updateRequest($card_id, $app_id, $card_patch_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1753,28 +1753,28 @@ function ($exception) { /** * Create request for operation 'update' * - * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param string $card_id The id of the app containing the Legacy CRM Card (required) + * @param int $app_id The id of the app containing the Legacy CRM Card. (required) * @param \HubSpot\Client\Crm\Extensions\Cards\Model\CardPatchRequest $card_patch_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateRequest($app_id, $card_id, $card_patch_request, string $contentType = self::contentTypes['update'][0]) + public function updateRequest($card_id, $app_id, $card_patch_request, string $contentType = self::contentTypes['update'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'card_id' is set + if ($card_id === null || (is_array($card_id) && count($card_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling update' + 'Missing the required parameter $card_id when calling update' ); } - // verify the required parameter 'card_id' is set - if ($card_id === null || (is_array($card_id) && count($card_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $card_id when calling update' + 'Missing the required parameter $app_id when calling update' ); } @@ -1796,18 +1796,18 @@ public function updateRequest($app_id, $card_id, $card_patch_request, string $co // path params - if ($app_id !== null) { + if ($card_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'cardId' . '}', + ObjectSerializer::toPathValue($card_id), $resourcePath ); } // path params - if ($card_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'cardId' . '}', - ObjectSerializer::toPathValue($card_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } diff --git a/codegen/Crm/Imports/Api/AdvancedApi.php b/codegen/Crm/Imports/Api/AdvancedApi.php index 760a9d3e..d3797821 100644 --- a/codegen/Crm/Imports/Api/AdvancedApi.php +++ b/codegen/Crm/Imports/Api/AdvancedApi.php @@ -73,12 +73,12 @@ class AdvancedApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmV3Imports' => [ - 'multipart/form-data', - ], - 'crmV3ImportsImportIdCancel' => [ + 'cancel' => [ 'application/json', ], + 'create' => [ + 'multipart/form-data', + ], ]; /** @@ -128,36 +128,38 @@ public function getConfig() } /** - * Operation crmV3Imports + * Operation cancel * - * @param \SplFileObject|null $files files (optional) - * @param string|null $import_request import_request (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Imports'] to see the possible values for this operation + * Cancel an active import + * + * @param int $import_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancel'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Imports\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Imports\Model\PublicImportResponse|\HubSpot\Client\Crm\Imports\Model\Error + * @return \HubSpot\Client\Crm\Imports\Model\ActionResponse|\HubSpot\Client\Crm\Imports\Model\Error */ - public function crmV3Imports($files = null, $import_request = null, string $contentType = self::contentTypes['crmV3Imports'][0]) + public function cancel($import_id, string $contentType = self::contentTypes['cancel'][0]) { - list($response) = $this->crmV3ImportsWithHttpInfo($files, $import_request, $contentType); + list($response) = $this->cancelWithHttpInfo($import_id, $contentType); return $response; } /** - * Operation crmV3ImportsWithHttpInfo + * Operation cancelWithHttpInfo * - * @param \SplFileObject|null $files (optional) - * @param string|null $import_request (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Imports'] to see the possible values for this operation + * Cancel an active import + * + * @param int $import_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancel'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Imports\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Imports\Model\PublicImportResponse|\HubSpot\Client\Crm\Imports\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Imports\Model\ActionResponse|\HubSpot\Client\Crm\Imports\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ImportsWithHttpInfo($files = null, $import_request = null, string $contentType = self::contentTypes['crmV3Imports'][0]) + public function cancelWithHttpInfo($import_id, string $contentType = self::contentTypes['cancel'][0]) { - $request = $this->crmV3ImportsRequest($files, $import_request, $contentType); + $request = $this->cancelRequest($import_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -185,7 +187,7 @@ public function crmV3ImportsWithHttpInfo($files = null, $import_request = null, switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', + '\HubSpot\Client\Crm\Imports\Model\ActionResponse', $request, $response, ); @@ -213,7 +215,7 @@ public function crmV3ImportsWithHttpInfo($files = null, $import_request = null, } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', + '\HubSpot\Client\Crm\Imports\Model\ActionResponse', $request, $response, ); @@ -222,7 +224,7 @@ public function crmV3ImportsWithHttpInfo($files = null, $import_request = null, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', + '\HubSpot\Client\Crm\Imports\Model\ActionResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -243,18 +245,19 @@ public function crmV3ImportsWithHttpInfo($files = null, $import_request = null, } /** - * Operation crmV3ImportsAsync + * Operation cancelAsync * - * @param \SplFileObject|null $files (optional) - * @param string|null $import_request (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Imports'] to see the possible values for this operation + * Cancel an active import + * + * @param int $import_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancel'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ImportsAsync($files = null, $import_request = null, string $contentType = self::contentTypes['crmV3Imports'][0]) + public function cancelAsync($import_id, string $contentType = self::contentTypes['cancel'][0]) { - return $this->crmV3ImportsAsyncWithHttpInfo($files, $import_request, $contentType) + return $this->cancelAsyncWithHttpInfo($import_id, $contentType) ->then( function ($response) { return $response[0]; @@ -263,19 +266,20 @@ function ($response) { } /** - * Operation crmV3ImportsAsyncWithHttpInfo + * Operation cancelAsyncWithHttpInfo * - * @param \SplFileObject|null $files (optional) - * @param string|null $import_request (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Imports'] to see the possible values for this operation + * Cancel an active import + * + * @param int $import_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancel'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ImportsAsyncWithHttpInfo($files = null, $import_request = null, string $contentType = self::contentTypes['crmV3Imports'][0]) + public function cancelAsyncWithHttpInfo($import_id, string $contentType = self::contentTypes['cancel'][0]) { - $returnType = '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse'; - $request = $this->crmV3ImportsRequest($files, $import_request, $contentType); + $returnType = '\HubSpot\Client\Crm\Imports\Model\ActionResponse'; + $request = $this->cancelRequest($import_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -314,22 +318,26 @@ function ($exception) { } /** - * Create request for operation 'crmV3Imports' + * Create request for operation 'cancel' * - * @param \SplFileObject|null $files (optional) - * @param string|null $import_request (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Imports'] to see the possible values for this operation + * @param int $import_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancel'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ImportsRequest($files = null, $import_request = null, string $contentType = self::contentTypes['crmV3Imports'][0]) + public function cancelRequest($import_id, string $contentType = self::contentTypes['cancel'][0]) { + // verify the required parameter 'import_id' is set + if ($import_id === null || (is_array($import_id) && count($import_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $import_id when calling cancel' + ); + } - - $resourcePath = '/crm/v3/imports'; + $resourcePath = '/crm/v3/imports/{importId}/cancel'; $formParams = []; $queryParams = []; $headerParams = []; @@ -338,19 +346,16 @@ public function crmV3ImportsRequest($files = null, $import_request = null, strin + // path params + if ($import_id !== null) { + $resourcePath = str_replace( + '{' . 'importId' . '}', + ObjectSerializer::toPathValue($import_id), + $resourcePath + ); + } - // form params - $formDataProcessor = new FormDataProcessor(); - - $formData = $formDataProcessor->prepare([ - 'files' => $files, - 'import_request' => $import_request, - ]); - - $formParams = $formDataProcessor->flatten($formData); - $multipart = $formDataProcessor->has_file; - $multipart = true; $headers = $this->headerSelector->selectHeaders( ['application/json', '*/*', ], $contentType, @@ -409,38 +414,36 @@ public function crmV3ImportsRequest($files = null, $import_request = null, strin } /** - * Operation crmV3ImportsImportIdCancel - * - * Cancel an active import + * Operation create * - * @param int $import_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportIdCancel'] to see the possible values for this operation + * @param \SplFileObject|null $files files (optional) + * @param string|null $import_request import_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Imports\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Imports\Model\ActionResponse|\HubSpot\Client\Crm\Imports\Model\Error + * @return \HubSpot\Client\Crm\Imports\Model\PublicImportResponse|\HubSpot\Client\Crm\Imports\Model\Error */ - public function crmV3ImportsImportIdCancel($import_id, string $contentType = self::contentTypes['crmV3ImportsImportIdCancel'][0]) + public function create($files = null, $import_request = null, string $contentType = self::contentTypes['create'][0]) { - list($response) = $this->crmV3ImportsImportIdCancelWithHttpInfo($import_id, $contentType); + list($response) = $this->createWithHttpInfo($files, $import_request, $contentType); return $response; } /** - * Operation crmV3ImportsImportIdCancelWithHttpInfo - * - * Cancel an active import + * Operation createWithHttpInfo * - * @param int $import_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportIdCancel'] to see the possible values for this operation + * @param \SplFileObject|null $files (optional) + * @param string|null $import_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Imports\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Imports\Model\ActionResponse|\HubSpot\Client\Crm\Imports\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Imports\Model\PublicImportResponse|\HubSpot\Client\Crm\Imports\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ImportsImportIdCancelWithHttpInfo($import_id, string $contentType = self::contentTypes['crmV3ImportsImportIdCancel'][0]) + public function createWithHttpInfo($files = null, $import_request = null, string $contentType = self::contentTypes['create'][0]) { - $request = $this->crmV3ImportsImportIdCancelRequest($import_id, $contentType); + $request = $this->createRequest($files, $import_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -468,7 +471,7 @@ public function crmV3ImportsImportIdCancelWithHttpInfo($import_id, string $conte switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Imports\Model\ActionResponse', + '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', $request, $response, ); @@ -496,7 +499,7 @@ public function crmV3ImportsImportIdCancelWithHttpInfo($import_id, string $conte } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Imports\Model\ActionResponse', + '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', $request, $response, ); @@ -505,7 +508,7 @@ public function crmV3ImportsImportIdCancelWithHttpInfo($import_id, string $conte case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Imports\Model\ActionResponse', + '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -526,19 +529,18 @@ public function crmV3ImportsImportIdCancelWithHttpInfo($import_id, string $conte } /** - * Operation crmV3ImportsImportIdCancelAsync - * - * Cancel an active import + * Operation createAsync * - * @param int $import_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportIdCancel'] to see the possible values for this operation + * @param \SplFileObject|null $files (optional) + * @param string|null $import_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ImportsImportIdCancelAsync($import_id, string $contentType = self::contentTypes['crmV3ImportsImportIdCancel'][0]) + public function createAsync($files = null, $import_request = null, string $contentType = self::contentTypes['create'][0]) { - return $this->crmV3ImportsImportIdCancelAsyncWithHttpInfo($import_id, $contentType) + return $this->createAsyncWithHttpInfo($files, $import_request, $contentType) ->then( function ($response) { return $response[0]; @@ -547,20 +549,19 @@ function ($response) { } /** - * Operation crmV3ImportsImportIdCancelAsyncWithHttpInfo - * - * Cancel an active import + * Operation createAsyncWithHttpInfo * - * @param int $import_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportIdCancel'] to see the possible values for this operation + * @param \SplFileObject|null $files (optional) + * @param string|null $import_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ImportsImportIdCancelAsyncWithHttpInfo($import_id, string $contentType = self::contentTypes['crmV3ImportsImportIdCancel'][0]) + public function createAsyncWithHttpInfo($files = null, $import_request = null, string $contentType = self::contentTypes['create'][0]) { - $returnType = '\HubSpot\Client\Crm\Imports\Model\ActionResponse'; - $request = $this->crmV3ImportsImportIdCancelRequest($import_id, $contentType); + $returnType = '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse'; + $request = $this->createRequest($files, $import_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -599,26 +600,22 @@ function ($exception) { } /** - * Create request for operation 'crmV3ImportsImportIdCancel' + * Create request for operation 'create' * - * @param int $import_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportIdCancel'] to see the possible values for this operation + * @param \SplFileObject|null $files (optional) + * @param string|null $import_request (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ImportsImportIdCancelRequest($import_id, string $contentType = self::contentTypes['crmV3ImportsImportIdCancel'][0]) + public function createRequest($files = null, $import_request = null, string $contentType = self::contentTypes['create'][0]) { - // verify the required parameter 'import_id' is set - if ($import_id === null || (is_array($import_id) && count($import_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $import_id when calling crmV3ImportsImportIdCancel' - ); - } - $resourcePath = '/crm/v3/imports/{importId}/cancel'; + + $resourcePath = '/crm/v3/imports'; $formParams = []; $queryParams = []; $headerParams = []; @@ -627,16 +624,19 @@ public function crmV3ImportsImportIdCancelRequest($import_id, string $contentTyp - // path params - if ($import_id !== null) { - $resourcePath = str_replace( - '{' . 'importId' . '}', - ObjectSerializer::toPathValue($import_id), - $resourcePath - ); - } + // form params + $formDataProcessor = new FormDataProcessor(); + $formData = $formDataProcessor->prepare([ + 'files' => $files, + 'importRequest' => $import_request, + ]); + + $formParams = $formDataProcessor->flatten($formData); + $multipart = $formDataProcessor->has_file; + + $multipart = true; $headers = $this->headerSelector->selectHeaders( ['application/json', '*/*', ], $contentType, diff --git a/codegen/Crm/Imports/Api/BasicApi.php b/codegen/Crm/Imports/Api/BasicApi.php index 21d2545b..8a4b2216 100644 --- a/codegen/Crm/Imports/Api/BasicApi.php +++ b/codegen/Crm/Imports/Api/BasicApi.php @@ -73,13 +73,13 @@ class BasicApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmV3Imports' => [ + 'getById' => [ 'application/json', ], - 'crmV3ImportsImportId' => [ + 'getErrors' => [ 'application/json', ], - 'crmV3ImportsImportIdErrors' => [ + 'getImportsPage' => [ 'application/json', ], ]; @@ -131,36 +131,38 @@ public function getConfig() } /** - * Operation crmV3Imports + * Operation getById * - * @param string|null $after after (optional) - * @param int|null $limit limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Imports'] to see the possible values for this operation + * Get the information on any import + * + * @param int $import_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Imports\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging|\HubSpot\Client\Crm\Imports\Model\Error + * @return \HubSpot\Client\Crm\Imports\Model\PublicImportResponse|\HubSpot\Client\Crm\Imports\Model\Error */ - public function crmV3Imports($after = null, $limit = null, string $contentType = self::contentTypes['crmV3Imports'][0]) + public function getById($import_id, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->crmV3ImportsWithHttpInfo($after, $limit, $contentType); + list($response) = $this->getByIdWithHttpInfo($import_id, $contentType); return $response; } /** - * Operation crmV3ImportsWithHttpInfo + * Operation getByIdWithHttpInfo * - * @param string|null $after (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Imports'] to see the possible values for this operation + * Get the information on any import + * + * @param int $import_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Imports\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging|\HubSpot\Client\Crm\Imports\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Imports\Model\PublicImportResponse|\HubSpot\Client\Crm\Imports\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ImportsWithHttpInfo($after = null, $limit = null, string $contentType = self::contentTypes['crmV3Imports'][0]) + public function getByIdWithHttpInfo($import_id, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->crmV3ImportsRequest($after, $limit, $contentType); + $request = $this->getByIdRequest($import_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -188,7 +190,7 @@ public function crmV3ImportsWithHttpInfo($after = null, $limit = null, string $c switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging', + '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', $request, $response, ); @@ -216,7 +218,7 @@ public function crmV3ImportsWithHttpInfo($after = null, $limit = null, string $c } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging', + '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', $request, $response, ); @@ -225,7 +227,7 @@ public function crmV3ImportsWithHttpInfo($after = null, $limit = null, string $c case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging', + '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -246,18 +248,19 @@ public function crmV3ImportsWithHttpInfo($after = null, $limit = null, string $c } /** - * Operation crmV3ImportsAsync + * Operation getByIdAsync * - * @param string|null $after (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Imports'] to see the possible values for this operation + * Get the information on any import + * + * @param int $import_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ImportsAsync($after = null, $limit = null, string $contentType = self::contentTypes['crmV3Imports'][0]) + public function getByIdAsync($import_id, string $contentType = self::contentTypes['getById'][0]) { - return $this->crmV3ImportsAsyncWithHttpInfo($after, $limit, $contentType) + return $this->getByIdAsyncWithHttpInfo($import_id, $contentType) ->then( function ($response) { return $response[0]; @@ -266,19 +269,20 @@ function ($response) { } /** - * Operation crmV3ImportsAsyncWithHttpInfo + * Operation getByIdAsyncWithHttpInfo * - * @param string|null $after (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Imports'] to see the possible values for this operation + * Get the information on any import + * + * @param int $import_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ImportsAsyncWithHttpInfo($after = null, $limit = null, string $contentType = self::contentTypes['crmV3Imports'][0]) + public function getByIdAsyncWithHttpInfo($import_id, string $contentType = self::contentTypes['getById'][0]) { - $returnType = '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging'; - $request = $this->crmV3ImportsRequest($after, $limit, $contentType); + $returnType = '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse'; + $request = $this->getByIdRequest($import_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -317,48 +321,42 @@ function ($exception) { } /** - * Create request for operation 'crmV3Imports' + * Create request for operation 'getById' * - * @param string|null $after (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Imports'] to see the possible values for this operation + * @param int $import_id (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ImportsRequest($after = null, $limit = null, string $contentType = self::contentTypes['crmV3Imports'][0]) + public function getByIdRequest($import_id, string $contentType = self::contentTypes['getById'][0]) { + // verify the required parameter 'import_id' is set + if ($import_id === null || (is_array($import_id) && count($import_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $import_id when calling getById' + ); + } - - $resourcePath = '/crm/v3/imports'; + $resourcePath = '/crm/v3/imports/{importId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($import_id !== null) { + $resourcePath = str_replace( + '{' . 'importId' . '}', + ObjectSerializer::toPathValue($import_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -419,38 +417,46 @@ public function crmV3ImportsRequest($after = null, $limit = null, string $conten } /** - * Operation crmV3ImportsImportId + * Operation getErrors * - * Get the information on any import + * Retrieve errors for a specific import * * @param int $import_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportId'] to see the possible values for this operation + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param bool|null $include_error_message (optional) + * @param bool|null $include_row_data (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getErrors'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Imports\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Imports\Model\PublicImportResponse|\HubSpot\Client\Crm\Imports\Model\Error + * @return \HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging|\HubSpot\Client\Crm\Imports\Model\Error */ - public function crmV3ImportsImportId($import_id, string $contentType = self::contentTypes['crmV3ImportsImportId'][0]) + public function getErrors($import_id, $after = null, $limit = null, $include_error_message = null, $include_row_data = null, string $contentType = self::contentTypes['getErrors'][0]) { - list($response) = $this->crmV3ImportsImportIdWithHttpInfo($import_id, $contentType); + list($response) = $this->getErrorsWithHttpInfo($import_id, $after, $limit, $include_error_message, $include_row_data, $contentType); return $response; } /** - * Operation crmV3ImportsImportIdWithHttpInfo + * Operation getErrorsWithHttpInfo * - * Get the information on any import + * Retrieve errors for a specific import * * @param int $import_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportId'] to see the possible values for this operation + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param bool|null $include_error_message (optional) + * @param bool|null $include_row_data (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getErrors'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Imports\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Imports\Model\PublicImportResponse|\HubSpot\Client\Crm\Imports\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging|\HubSpot\Client\Crm\Imports\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ImportsImportIdWithHttpInfo($import_id, string $contentType = self::contentTypes['crmV3ImportsImportId'][0]) + public function getErrorsWithHttpInfo($import_id, $after = null, $limit = null, $include_error_message = null, $include_row_data = null, string $contentType = self::contentTypes['getErrors'][0]) { - $request = $this->crmV3ImportsImportIdRequest($import_id, $contentType); + $request = $this->getErrorsRequest($import_id, $after, $limit, $include_error_message, $include_row_data, $contentType); try { $options = $this->createHttpClientOption(); @@ -478,7 +484,7 @@ public function crmV3ImportsImportIdWithHttpInfo($import_id, string $contentType switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', + '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging', $request, $response, ); @@ -506,7 +512,7 @@ public function crmV3ImportsImportIdWithHttpInfo($import_id, string $contentType } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', + '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging', $request, $response, ); @@ -515,7 +521,7 @@ public function crmV3ImportsImportIdWithHttpInfo($import_id, string $contentType case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse', + '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -536,19 +542,23 @@ public function crmV3ImportsImportIdWithHttpInfo($import_id, string $contentType } /** - * Operation crmV3ImportsImportIdAsync + * Operation getErrorsAsync * - * Get the information on any import + * Retrieve errors for a specific import * * @param int $import_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportId'] to see the possible values for this operation + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param bool|null $include_error_message (optional) + * @param bool|null $include_row_data (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getErrors'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ImportsImportIdAsync($import_id, string $contentType = self::contentTypes['crmV3ImportsImportId'][0]) + public function getErrorsAsync($import_id, $after = null, $limit = null, $include_error_message = null, $include_row_data = null, string $contentType = self::contentTypes['getErrors'][0]) { - return $this->crmV3ImportsImportIdAsyncWithHttpInfo($import_id, $contentType) + return $this->getErrorsAsyncWithHttpInfo($import_id, $after, $limit, $include_error_message, $include_row_data, $contentType) ->then( function ($response) { return $response[0]; @@ -557,20 +567,24 @@ function ($response) { } /** - * Operation crmV3ImportsImportIdAsyncWithHttpInfo + * Operation getErrorsAsyncWithHttpInfo * - * Get the information on any import + * Retrieve errors for a specific import * * @param int $import_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportId'] to see the possible values for this operation + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param bool|null $include_error_message (optional) + * @param bool|null $include_row_data (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getErrors'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ImportsImportIdAsyncWithHttpInfo($import_id, string $contentType = self::contentTypes['crmV3ImportsImportId'][0]) + public function getErrorsAsyncWithHttpInfo($import_id, $after = null, $limit = null, $include_error_message = null, $include_row_data = null, string $contentType = self::contentTypes['getErrors'][0]) { - $returnType = '\HubSpot\Client\Crm\Imports\Model\PublicImportResponse'; - $request = $this->crmV3ImportsImportIdRequest($import_id, $contentType); + $returnType = '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging'; + $request = $this->getErrorsRequest($import_id, $after, $limit, $include_error_message, $include_row_data, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -609,32 +623,76 @@ function ($exception) { } /** - * Create request for operation 'crmV3ImportsImportId' + * Create request for operation 'getErrors' * * @param int $import_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportId'] to see the possible values for this operation + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) + * @param int|null $limit The maximum number of results to display per page. (optional) + * @param bool|null $include_error_message (optional) + * @param bool|null $include_row_data (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getErrors'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ImportsImportIdRequest($import_id, string $contentType = self::contentTypes['crmV3ImportsImportId'][0]) + public function getErrorsRequest($import_id, $after = null, $limit = null, $include_error_message = null, $include_row_data = null, string $contentType = self::contentTypes['getErrors'][0]) { // verify the required parameter 'import_id' is set if ($import_id === null || (is_array($import_id) && count($import_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $import_id when calling crmV3ImportsImportId' + 'Missing the required parameter $import_id when calling getErrors' ); } - $resourcePath = '/crm/v3/imports/{importId}'; + + + + + $resourcePath = '/crm/v3/imports/{importId}/errors'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include_error_message, + 'includeErrorMessage', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include_row_data, + 'includeRowData', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -705,46 +763,36 @@ public function crmV3ImportsImportIdRequest($import_id, string $contentType = se } /** - * Operation crmV3ImportsImportIdErrors + * Operation getImportsPage * - * Retrieve errors for a specific import - * - * @param int $import_id (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $include_error_message (optional) - * @param bool|null $include_row_data (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportIdErrors'] to see the possible values for this operation + * @param string|null $after after (optional) + * @param int|null $limit limit (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getImportsPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Imports\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging|\HubSpot\Client\Crm\Imports\Model\Error + * @return \HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging|\HubSpot\Client\Crm\Imports\Model\Error */ - public function crmV3ImportsImportIdErrors($import_id, $after = null, $include_error_message = null, $include_row_data = null, $limit = null, string $contentType = self::contentTypes['crmV3ImportsImportIdErrors'][0]) + public function getImportsPage($after = null, $limit = null, string $contentType = self::contentTypes['getImportsPage'][0]) { - list($response) = $this->crmV3ImportsImportIdErrorsWithHttpInfo($import_id, $after, $include_error_message, $include_row_data, $limit, $contentType); + list($response) = $this->getImportsPageWithHttpInfo($after, $limit, $contentType); return $response; } /** - * Operation crmV3ImportsImportIdErrorsWithHttpInfo - * - * Retrieve errors for a specific import + * Operation getImportsPageWithHttpInfo * - * @param int $import_id (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $include_error_message (optional) - * @param bool|null $include_row_data (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportIdErrors'] to see the possible values for this operation + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getImportsPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Imports\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging|\HubSpot\Client\Crm\Imports\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging|\HubSpot\Client\Crm\Imports\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ImportsImportIdErrorsWithHttpInfo($import_id, $after = null, $include_error_message = null, $include_row_data = null, $limit = null, string $contentType = self::contentTypes['crmV3ImportsImportIdErrors'][0]) + public function getImportsPageWithHttpInfo($after = null, $limit = null, string $contentType = self::contentTypes['getImportsPage'][0]) { - $request = $this->crmV3ImportsImportIdErrorsRequest($import_id, $after, $include_error_message, $include_row_data, $limit, $contentType); + $request = $this->getImportsPageRequest($after, $limit, $contentType); try { $options = $this->createHttpClientOption(); @@ -772,7 +820,7 @@ public function crmV3ImportsImportIdErrorsWithHttpInfo($import_id, $after = null switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging', + '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging', $request, $response, ); @@ -800,7 +848,7 @@ public function crmV3ImportsImportIdErrorsWithHttpInfo($import_id, $after = null } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging', + '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging', $request, $response, ); @@ -809,7 +857,7 @@ public function crmV3ImportsImportIdErrorsWithHttpInfo($import_id, $after = null case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging', + '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -830,23 +878,18 @@ public function crmV3ImportsImportIdErrorsWithHttpInfo($import_id, $after = null } /** - * Operation crmV3ImportsImportIdErrorsAsync + * Operation getImportsPageAsync * - * Retrieve errors for a specific import - * - * @param int $import_id (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $include_error_message (optional) - * @param bool|null $include_row_data (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportIdErrors'] to see the possible values for this operation + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getImportsPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ImportsImportIdErrorsAsync($import_id, $after = null, $include_error_message = null, $include_row_data = null, $limit = null, string $contentType = self::contentTypes['crmV3ImportsImportIdErrors'][0]) + public function getImportsPageAsync($after = null, $limit = null, string $contentType = self::contentTypes['getImportsPage'][0]) { - return $this->crmV3ImportsImportIdErrorsAsyncWithHttpInfo($import_id, $after, $include_error_message, $include_row_data, $limit, $contentType) + return $this->getImportsPageAsyncWithHttpInfo($after, $limit, $contentType) ->then( function ($response) { return $response[0]; @@ -855,24 +898,19 @@ function ($response) { } /** - * Operation crmV3ImportsImportIdErrorsAsyncWithHttpInfo - * - * Retrieve errors for a specific import + * Operation getImportsPageAsyncWithHttpInfo * - * @param int $import_id (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $include_error_message (optional) - * @param bool|null $include_row_data (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportIdErrors'] to see the possible values for this operation + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getImportsPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ImportsImportIdErrorsAsyncWithHttpInfo($import_id, $after = null, $include_error_message = null, $include_row_data = null, $limit = null, string $contentType = self::contentTypes['crmV3ImportsImportIdErrors'][0]) + public function getImportsPageAsyncWithHttpInfo($after = null, $limit = null, string $contentType = self::contentTypes['getImportsPage'][0]) { - $returnType = '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportErrorForwardPaging'; - $request = $this->crmV3ImportsImportIdErrorsRequest($import_id, $after, $include_error_message, $include_row_data, $limit, $contentType); + $returnType = '\HubSpot\Client\Crm\Imports\Model\CollectionResponsePublicImportResponseForwardPaging'; + $request = $this->getImportsPageRequest($after, $limit, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -911,34 +949,22 @@ function ($exception) { } /** - * Create request for operation 'crmV3ImportsImportIdErrors' + * Create request for operation 'getImportsPage' * - * @param int $import_id (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $include_error_message (optional) - * @param bool|null $include_row_data (optional) - * @param int|null $limit The maximum number of results to display per page. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ImportsImportIdErrors'] to see the possible values for this operation + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getImportsPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ImportsImportIdErrorsRequest($import_id, $after = null, $include_error_message = null, $include_row_data = null, $limit = null, string $contentType = self::contentTypes['crmV3ImportsImportIdErrors'][0]) + public function getImportsPageRequest($after = null, $limit = null, string $contentType = self::contentTypes['getImportsPage'][0]) { - // verify the required parameter 'import_id' is set - if ($import_id === null || (is_array($import_id) && count($import_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $import_id when calling crmV3ImportsImportIdErrors' - ); - } - - - - $resourcePath = '/crm/v3/imports/{importId}/errors'; + $resourcePath = '/crm/v3/imports'; $formParams = []; $queryParams = []; $headerParams = []; @@ -955,24 +981,6 @@ public function crmV3ImportsImportIdErrorsRequest($import_id, $after = null, $in false // required ) ?? []); // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include_error_message, - 'includeErrorMessage', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include_row_data, - 'includeRowData', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $limit, 'limit', // param base name @@ -983,14 +991,6 @@ public function crmV3ImportsImportIdErrorsRequest($import_id, $after = null, $in ) ?? []); - // path params - if ($import_id !== null) { - $resourcePath = str_replace( - '{' . 'importId' . '}', - ObjectSerializer::toPathValue($import_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( diff --git a/codegen/Crm/LineItems/Api/BasicApi.php b/codegen/Crm/LineItems/Api/BasicApi.php index f01a8ddc..81000852 100644 --- a/codegen/Crm/LineItems/Api/BasicApi.php +++ b/codegen/Crm/LineItems/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $line_item_id line_item_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\LineItems\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\LineItems\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\LineItems\Model\Error */ - public function getById($line_item_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($line_item_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($line_item_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($line_item_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($line_item_id, $archived = false, $associations = null, * Read * * @param string $line_item_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\LineItems\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\LineItems\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\LineItems\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($line_item_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($line_item_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($line_item_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($line_item_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($line_item_id, $archived = false, $associati * Read * * @param string $line_item_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($line_item_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($line_item_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($line_item_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($line_item_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $line_item_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($line_item_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($line_item_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\LineItems\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($line_item_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($line_item_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $line_item_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($line_item_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($line_item_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'line_item_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($line_item_id, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($line_item_id, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($line_item_id, $archived = false, $associations = * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of line items that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\LineItems\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\LineItems\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\LineItems\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of line items that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\LineItems\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\LineItems\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\LineItems\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of line items that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of line items that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\LineItems\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of line items that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Lists/Api/BasicApi.php b/codegen/Crm/Lists/Api/BasicApi.php index d6a49dd3..16f67555 100644 --- a/codegen/Crm/Lists/Api/BasicApi.php +++ b/codegen/Crm/Lists/Api/BasicApi.php @@ -73,88 +73,88 @@ class BasicApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmV3Lists' => [ + 'add' => [ 'application/json', ], - 'crmV3ListsFolders' => [ + 'addAllFromList' => [ 'application/json', ], - 'crmV3ListsFoldersFolderId' => [ + 'addAndRemove' => [ 'application/json', ], - 'crmV3ListsFoldersFolderIdMoveNewParentFolderId' => [ + 'cancelConversion' => [ 'application/json', ], - 'crmV3ListsFoldersFolderIdRename' => [ + 'create' => [ 'application/json', ], - 'crmV3ListsFoldersMoveList' => [ + 'createFolder' => [ 'application/json', ], - 'crmV3ListsFolders_0' => [ + 'getAll' => [ 'application/json', ], - 'crmV3ListsIdmapping' => [ + 'getAllFolders' => [ 'application/json', ], - 'crmV3ListsIdmapping_0' => [ + 'getById' => [ 'application/json', ], - 'crmV3ListsListId' => [ + 'getByName' => [ 'application/json', ], - 'crmV3ListsListIdMemberships' => [ + 'getConversionDetails' => [ 'application/json', ], - 'crmV3ListsListIdMembershipsAdd' => [ + 'getLists' => [ 'application/json', ], - 'crmV3ListsListIdMembershipsAddAndRemove' => [ + 'getPage' => [ 'application/json', ], - 'crmV3ListsListIdMembershipsAddFromSourceListId' => [ + 'getPageOrderedByAddedToListDate' => [ 'application/json', ], - 'crmV3ListsListIdMembershipsJoinOrder' => [ + 'getSizeAndEditsHistory' => [ 'application/json', ], - 'crmV3ListsListIdMembershipsRemove' => [ + 'move' => [ 'application/json', ], - 'crmV3ListsListIdMemberships_0' => [ + 'moveList' => [ 'application/json', ], - 'crmV3ListsListIdRestore' => [ + 'remove' => [ 'application/json', ], - 'crmV3ListsListIdScheduleConversion' => [ + 'removeAll' => [ 'application/json', ], - 'crmV3ListsListIdScheduleConversion_0' => [ + 'removeFolder' => [ 'application/json', ], - 'crmV3ListsListIdScheduleConversion_1' => [ + 'removeMembers' => [ 'application/json', ], - 'crmV3ListsListIdSizeAndEditsHistoryBetween' => [ + 'rename' => [ 'application/json', ], - 'crmV3ListsListIdUpdateListFilters' => [ + 'restore' => [ 'application/json', ], - 'crmV3ListsListIdUpdateListName' => [ + 'scheduleConversion' => [ 'application/json', ], - 'crmV3ListsListId_0' => [ + 'translateLegacyListIdToListId' => [ 'application/json', ], - 'crmV3ListsObjectTypeIdObjectTypeIdNameListName' => [ + 'translateLegacyListIdToListIdBatch' => [ 'application/json', ], - 'crmV3ListsRecordsObjectTypeIdRecordIdMemberships' => [ + 'updateListFilters' => [ 'application/json', ], - 'crmV3Lists_0' => [ + 'updateName' => [ 'application/json', ], ]; @@ -206,36 +206,40 @@ public function getConfig() } /** - * Operation crmV3Lists + * Operation add * - * @param bool|null $include_filters include_filters (optional, default to false) - * @param string[]|null $list_ids list_ids (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Lists'] to see the possible values for this operation + * Add Records to a List + * + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string[] $request_body request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['add'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ListsByIdResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3Lists($include_filters = false, $list_ids = null, string $contentType = self::contentTypes['crmV3Lists'][0]) + public function add($list_id, $request_body, string $contentType = self::contentTypes['add'][0]) { - list($response) = $this->crmV3ListsWithHttpInfo($include_filters, $list_ids, $contentType); + list($response) = $this->addWithHttpInfo($list_id, $request_body, $contentType); return $response; } /** - * Operation crmV3ListsWithHttpInfo + * Operation addWithHttpInfo * - * @param bool|null $include_filters (optional, default to false) - * @param string[]|null $list_ids (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Lists'] to see the possible values for this operation + * Add Records to a List + * + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['add'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ListsByIdResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsWithHttpInfo($include_filters = false, $list_ids = null, string $contentType = self::contentTypes['crmV3Lists'][0]) + public function addWithHttpInfo($list_id, $request_body, string $contentType = self::contentTypes['add'][0]) { - $request = $this->crmV3ListsRequest($include_filters, $list_ids, $contentType); + $request = $this->addRequest($list_id, $request_body, $contentType); try { $options = $this->createHttpClientOption(); @@ -263,7 +267,7 @@ public function crmV3ListsWithHttpInfo($include_filters = false, $list_ids = nul switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListsByIdResponse', + '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', $request, $response, ); @@ -291,7 +295,7 @@ public function crmV3ListsWithHttpInfo($include_filters = false, $list_ids = nul } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListsByIdResponse', + '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', $request, $response, ); @@ -300,7 +304,7 @@ public function crmV3ListsWithHttpInfo($include_filters = false, $list_ids = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ListsByIdResponse', + '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -321,18 +325,20 @@ public function crmV3ListsWithHttpInfo($include_filters = false, $list_ids = nul } /** - * Operation crmV3ListsAsync + * Operation addAsync * - * @param bool|null $include_filters (optional, default to false) - * @param string[]|null $list_ids (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Lists'] to see the possible values for this operation + * Add Records to a List + * + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['add'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsAsync($include_filters = false, $list_ids = null, string $contentType = self::contentTypes['crmV3Lists'][0]) + public function addAsync($list_id, $request_body, string $contentType = self::contentTypes['add'][0]) { - return $this->crmV3ListsAsyncWithHttpInfo($include_filters, $list_ids, $contentType) + return $this->addAsyncWithHttpInfo($list_id, $request_body, $contentType) ->then( function ($response) { return $response[0]; @@ -341,19 +347,21 @@ function ($response) { } /** - * Operation crmV3ListsAsyncWithHttpInfo + * Operation addAsyncWithHttpInfo * - * @param bool|null $include_filters (optional, default to false) - * @param string[]|null $list_ids (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Lists'] to see the possible values for this operation + * Add Records to a List + * + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['add'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsAsyncWithHttpInfo($include_filters = false, $list_ids = null, string $contentType = self::contentTypes['crmV3Lists'][0]) + public function addAsyncWithHttpInfo($list_id, $request_body, string $contentType = self::contentTypes['add'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ListsByIdResponse'; - $request = $this->crmV3ListsRequest($include_filters, $list_ids, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse'; + $request = $this->addRequest($list_id, $request_body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -392,48 +400,50 @@ function ($exception) { } /** - * Create request for operation 'crmV3Lists' + * Create request for operation 'add' * - * @param bool|null $include_filters (optional, default to false) - * @param string[]|null $list_ids (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Lists'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['add'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsRequest($include_filters = false, $list_ids = null, string $contentType = self::contentTypes['crmV3Lists'][0]) + public function addRequest($list_id, $request_body, string $contentType = self::contentTypes['add'][0]) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $list_id when calling add' + ); + } + // verify the required parameter 'request_body' is set + if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $request_body when calling add' + ); + } - $resourcePath = '/crm/v3/lists'; + $resourcePath = '/crm/v3/lists/{listId}/memberships/add'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include_filters, - 'includeFilters', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $list_ids, - 'listIds', // param base name - 'array', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($list_id !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($list_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -443,7 +453,14 @@ public function crmV3ListsRequest($include_filters = false, $list_ids = null, st ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($request_body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($request_body), JSON_THROW_ON_ERROR); + } else { + $httpBody = $request_body; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -486,7 +503,7 @@ public function crmV3ListsRequest($include_filters = false, $list_ids = null, st $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -494,38 +511,39 @@ public function crmV3ListsRequest($include_filters = false, $list_ids = null, st } /** - * Operation crmV3ListsFolders + * Operation addAllFromList * - * Retrieves a folder. + * Add All Records from a Source List to a Destination List * - * @param string|null $folder_id The Id of the folder to retrieve. (optional, default to '0') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFolders'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. (required) + * @param string $source_list_id The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addAllFromList'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return void */ - public function crmV3ListsFolders($folder_id = '0', string $contentType = self::contentTypes['crmV3ListsFolders'][0]) + public function addAllFromList($list_id, $source_list_id, string $contentType = self::contentTypes['addAllFromList'][0]) { - list($response) = $this->crmV3ListsFoldersWithHttpInfo($folder_id, $contentType); - return $response; + $this->addAllFromListWithHttpInfo($list_id, $source_list_id, $contentType); } /** - * Operation crmV3ListsFoldersWithHttpInfo + * Operation addAllFromListWithHttpInfo * - * Retrieves a folder. + * Add All Records from a Source List to a Destination List * - * @param string|null $folder_id The Id of the folder to retrieve. (optional, default to '0') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFolders'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. (required) + * @param string $source_list_id The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addAllFromList'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsFoldersWithHttpInfo($folder_id = '0', string $contentType = self::contentTypes['crmV3ListsFolders'][0]) + public function addAllFromListWithHttpInfo($list_id, $source_list_id, string $contentType = self::contentTypes['addAllFromList'][0]) { - $request = $this->crmV3ListsFoldersRequest($folder_id, $contentType); + $request = $this->addAllFromListRequest($list_id, $source_list_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -550,51 +568,9 @@ public function crmV3ListsFoldersWithHttpInfo($folder_id = '0', string $contentT $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', - $request, - $response, - ); - default: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\Error', - $request, - $response, - ); - } - - - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', - $request, - $response, - ); + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -611,19 +587,20 @@ public function crmV3ListsFoldersWithHttpInfo($folder_id = '0', string $contentT } /** - * Operation crmV3ListsFoldersAsync + * Operation addAllFromListAsync * - * Retrieves a folder. + * Add All Records from a Source List to a Destination List * - * @param string|null $folder_id The Id of the folder to retrieve. (optional, default to '0') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFolders'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. (required) + * @param string $source_list_id The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addAllFromList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFoldersAsync($folder_id = '0', string $contentType = self::contentTypes['crmV3ListsFolders'][0]) + public function addAllFromListAsync($list_id, $source_list_id, string $contentType = self::contentTypes['addAllFromList'][0]) { - return $this->crmV3ListsFoldersAsyncWithHttpInfo($folder_id, $contentType) + return $this->addAllFromListAsyncWithHttpInfo($list_id, $source_list_id, $contentType) ->then( function ($response) { return $response[0]; @@ -632,39 +609,27 @@ function ($response) { } /** - * Operation crmV3ListsFoldersAsyncWithHttpInfo + * Operation addAllFromListAsyncWithHttpInfo * - * Retrieves a folder. + * Add All Records from a Source List to a Destination List * - * @param string|null $folder_id The Id of the folder to retrieve. (optional, default to '0') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFolders'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. (required) + * @param string $source_list_id The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addAllFromList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFoldersAsyncWithHttpInfo($folder_id = '0', string $contentType = self::contentTypes['crmV3ListsFolders'][0]) + public function addAllFromListAsyncWithHttpInfo($list_id, $source_list_id, string $contentType = self::contentTypes['addAllFromList'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse'; - $request = $this->crmV3ListsFoldersRequest($folder_id, $contentType); + $returnType = ''; + $request = $this->addAllFromListRequest($list_id, $source_list_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -684,41 +649,62 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsFolders' + * Create request for operation 'addAllFromList' * - * @param string|null $folder_id The Id of the folder to retrieve. (optional, default to '0') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFolders'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. (required) + * @param string $source_list_id The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addAllFromList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsFoldersRequest($folder_id = '0', string $contentType = self::contentTypes['crmV3ListsFolders'][0]) + public function addAllFromListRequest($list_id, $source_list_id, string $contentType = self::contentTypes['addAllFromList'][0]) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $list_id when calling addAllFromList' + ); + } + + // verify the required parameter 'source_list_id' is set + if ($source_list_id === null || (is_array($source_list_id) && count($source_list_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $source_list_id when calling addAllFromList' + ); + } - $resourcePath = '/crm/v3/lists/folders'; + $resourcePath = '/crm/v3/lists/{listId}/memberships/add-from/{sourceListId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $folder_id, - 'folderId', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($list_id !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($list_id), + $resourcePath + ); + } + // path params + if ($source_list_id !== null) { + $resourcePath = str_replace( + '{' . 'sourceListId' . '}', + ObjectSerializer::toPathValue($source_list_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( - ['application/json', '*/*', ], + ['*/*', ], $contentType, $multipart ); @@ -767,7 +753,7 @@ public function crmV3ListsFoldersRequest($folder_id = '0', string $contentType = $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -775,37 +761,40 @@ public function crmV3ListsFoldersRequest($folder_id = '0', string $contentType = } /** - * Operation crmV3ListsFoldersFolderId + * Operation addAndRemove * - * Deletes a folder + * Add and/or Remove Records from a List * - * @param string $folder_id The ID of the folder to delete (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderId'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param \HubSpot\Client\Crm\Lists\Model\MembershipChangeRequest $membership_change_request membership_change_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addAndRemove'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return void + * @return \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsFoldersFolderId($folder_id, string $contentType = self::contentTypes['crmV3ListsFoldersFolderId'][0]) + public function addAndRemove($list_id, $membership_change_request, string $contentType = self::contentTypes['addAndRemove'][0]) { - $this->crmV3ListsFoldersFolderIdWithHttpInfo($folder_id, $contentType); + list($response) = $this->addAndRemoveWithHttpInfo($list_id, $membership_change_request, $contentType); + return $response; } /** - * Operation crmV3ListsFoldersFolderIdWithHttpInfo + * Operation addAndRemoveWithHttpInfo * - * Deletes a folder + * Add and/or Remove Records from a List * - * @param string $folder_id The ID of the folder to delete (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderId'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param \HubSpot\Client\Crm\Lists\Model\MembershipChangeRequest $membership_change_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addAndRemove'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsFoldersFolderIdWithHttpInfo($folder_id, string $contentType = self::contentTypes['crmV3ListsFoldersFolderId'][0]) + public function addAndRemoveWithHttpInfo($list_id, $membership_change_request, string $contentType = self::contentTypes['addAndRemove'][0]) { - $request = $this->crmV3ListsFoldersFolderIdRequest($folder_id, $contentType); + $request = $this->addAndRemoveRequest($list_id, $membership_change_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -830,9 +819,51 @@ public function crmV3ListsFoldersFolderIdWithHttpInfo($folder_id, string $conten $statusCode = $response->getStatusCode(); - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\Error', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -849,19 +880,20 @@ public function crmV3ListsFoldersFolderIdWithHttpInfo($folder_id, string $conten } /** - * Operation crmV3ListsFoldersFolderIdAsync + * Operation addAndRemoveAsync * - * Deletes a folder + * Add and/or Remove Records from a List * - * @param string $folder_id The ID of the folder to delete (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderId'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param \HubSpot\Client\Crm\Lists\Model\MembershipChangeRequest $membership_change_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addAndRemove'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFoldersFolderIdAsync($folder_id, string $contentType = self::contentTypes['crmV3ListsFoldersFolderId'][0]) + public function addAndRemoveAsync($list_id, $membership_change_request, string $contentType = self::contentTypes['addAndRemove'][0]) { - return $this->crmV3ListsFoldersFolderIdAsyncWithHttpInfo($folder_id, $contentType) + return $this->addAndRemoveAsyncWithHttpInfo($list_id, $membership_change_request, $contentType) ->then( function ($response) { return $response[0]; @@ -870,26 +902,40 @@ function ($response) { } /** - * Operation crmV3ListsFoldersFolderIdAsyncWithHttpInfo + * Operation addAndRemoveAsyncWithHttpInfo * - * Deletes a folder + * Add and/or Remove Records from a List * - * @param string $folder_id The ID of the folder to delete (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderId'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param \HubSpot\Client\Crm\Lists\Model\MembershipChangeRequest $membership_change_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addAndRemove'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFoldersFolderIdAsyncWithHttpInfo($folder_id, string $contentType = self::contentTypes['crmV3ListsFoldersFolderId'][0]) + public function addAndRemoveAsyncWithHttpInfo($list_id, $membership_change_request, string $contentType = self::contentTypes['addAndRemove'][0]) { - $returnType = ''; - $request = $this->crmV3ListsFoldersFolderIdRequest($folder_id, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse'; + $request = $this->addAndRemoveRequest($list_id, $membership_change_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -909,26 +955,34 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsFoldersFolderId' + * Create request for operation 'addAndRemove' * - * @param string $folder_id The ID of the folder to delete (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderId'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param \HubSpot\Client\Crm\Lists\Model\MembershipChangeRequest $membership_change_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['addAndRemove'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsFoldersFolderIdRequest($folder_id, string $contentType = self::contentTypes['crmV3ListsFoldersFolderId'][0]) + public function addAndRemoveRequest($list_id, $membership_change_request, string $contentType = self::contentTypes['addAndRemove'][0]) { - // verify the required parameter 'folder_id' is set - if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $list_id when calling addAndRemove' + ); + } + + // verify the required parameter 'membership_change_request' is set + if ($membership_change_request === null || (is_array($membership_change_request) && count($membership_change_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folder_id when calling crmV3ListsFoldersFolderId' + 'Missing the required parameter $membership_change_request when calling addAndRemove' ); } - $resourcePath = '/crm/v3/lists/folders/{folderId}'; + $resourcePath = '/crm/v3/lists/{listId}/memberships/add-and-remove'; $formParams = []; $queryParams = []; $headerParams = []; @@ -938,23 +992,30 @@ public function crmV3ListsFoldersFolderIdRequest($folder_id, string $contentType // path params - if ($folder_id !== null) { + if ($list_id !== null) { $resourcePath = str_replace( - '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folder_id), + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($list_id), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( - ['*/*', ], + ['application/json', '*/*', ], $contentType, $multipart ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($membership_change_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($membership_change_request), JSON_THROW_ON_ERROR); + } else { + $httpBody = $membership_change_request; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -997,7 +1058,7 @@ public function crmV3ListsFoldersFolderIdRequest($folder_id, string $contentType $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1005,40 +1066,37 @@ public function crmV3ListsFoldersFolderIdRequest($folder_id, string $contentType } /** - * Operation crmV3ListsFoldersFolderIdMoveNewParentFolderId + * Operation cancelConversion * - * Moves a folder + * Cancel the conversion of a list * - * @param string $folder_id The ID of the folder to move (required) - * @param string $new_parent_folder_id The ID for the target parent folder. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderIdMoveNewParentFolderId'] to see the possible values for this operation + * @param string $list_id The ID of the list that you want to cancel the conversion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancelConversion'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return void */ - public function crmV3ListsFoldersFolderIdMoveNewParentFolderId($folder_id, $new_parent_folder_id, string $contentType = self::contentTypes['crmV3ListsFoldersFolderIdMoveNewParentFolderId'][0]) + public function cancelConversion($list_id, string $contentType = self::contentTypes['cancelConversion'][0]) { - list($response) = $this->crmV3ListsFoldersFolderIdMoveNewParentFolderIdWithHttpInfo($folder_id, $new_parent_folder_id, $contentType); - return $response; + $this->cancelConversionWithHttpInfo($list_id, $contentType); } /** - * Operation crmV3ListsFoldersFolderIdMoveNewParentFolderIdWithHttpInfo + * Operation cancelConversionWithHttpInfo * - * Moves a folder + * Cancel the conversion of a list * - * @param string $folder_id The ID of the folder to move (required) - * @param string $new_parent_folder_id The ID for the target parent folder. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderIdMoveNewParentFolderId'] to see the possible values for this operation + * @param string $list_id The ID of the list that you want to cancel the conversion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancelConversion'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsFoldersFolderIdMoveNewParentFolderIdWithHttpInfo($folder_id, $new_parent_folder_id, string $contentType = self::contentTypes['crmV3ListsFoldersFolderIdMoveNewParentFolderId'][0]) + public function cancelConversionWithHttpInfo($list_id, string $contentType = self::contentTypes['cancelConversion'][0]) { - $request = $this->crmV3ListsFoldersFolderIdMoveNewParentFolderIdRequest($folder_id, $new_parent_folder_id, $contentType); + $request = $this->cancelConversionRequest($list_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1063,51 +1121,9 @@ public function crmV3ListsFoldersFolderIdMoveNewParentFolderIdWithHttpInfo($fold $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', - $request, - $response, - ); - default: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\Error', - $request, - $response, - ); - } - - - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', - $request, - $response, - ); + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1124,20 +1140,19 @@ public function crmV3ListsFoldersFolderIdMoveNewParentFolderIdWithHttpInfo($fold } /** - * Operation crmV3ListsFoldersFolderIdMoveNewParentFolderIdAsync + * Operation cancelConversionAsync * - * Moves a folder + * Cancel the conversion of a list * - * @param string $folder_id The ID of the folder to move (required) - * @param string $new_parent_folder_id The ID for the target parent folder. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderIdMoveNewParentFolderId'] to see the possible values for this operation + * @param string $list_id The ID of the list that you want to cancel the conversion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancelConversion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFoldersFolderIdMoveNewParentFolderIdAsync($folder_id, $new_parent_folder_id, string $contentType = self::contentTypes['crmV3ListsFoldersFolderIdMoveNewParentFolderId'][0]) + public function cancelConversionAsync($list_id, string $contentType = self::contentTypes['cancelConversion'][0]) { - return $this->crmV3ListsFoldersFolderIdMoveNewParentFolderIdAsyncWithHttpInfo($folder_id, $new_parent_folder_id, $contentType) + return $this->cancelConversionAsyncWithHttpInfo($list_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1146,40 +1161,26 @@ function ($response) { } /** - * Operation crmV3ListsFoldersFolderIdMoveNewParentFolderIdAsyncWithHttpInfo + * Operation cancelConversionAsyncWithHttpInfo * - * Moves a folder + * Cancel the conversion of a list * - * @param string $folder_id The ID of the folder to move (required) - * @param string $new_parent_folder_id The ID for the target parent folder. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderIdMoveNewParentFolderId'] to see the possible values for this operation + * @param string $list_id The ID of the list that you want to cancel the conversion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancelConversion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFoldersFolderIdMoveNewParentFolderIdAsyncWithHttpInfo($folder_id, $new_parent_folder_id, string $contentType = self::contentTypes['crmV3ListsFoldersFolderIdMoveNewParentFolderId'][0]) + public function cancelConversionAsyncWithHttpInfo($list_id, string $contentType = self::contentTypes['cancelConversion'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse'; - $request = $this->crmV3ListsFoldersFolderIdMoveNewParentFolderIdRequest($folder_id, $new_parent_folder_id, $contentType); + $returnType = ''; + $request = $this->cancelConversionRequest($list_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -1199,62 +1200,46 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsFoldersFolderIdMoveNewParentFolderId' + * Create request for operation 'cancelConversion' * - * @param string $folder_id The ID of the folder to move (required) - * @param string $new_parent_folder_id The ID for the target parent folder. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderIdMoveNewParentFolderId'] to see the possible values for this operation + * @param string $list_id The ID of the list that you want to cancel the conversion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['cancelConversion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsFoldersFolderIdMoveNewParentFolderIdRequest($folder_id, $new_parent_folder_id, string $contentType = self::contentTypes['crmV3ListsFoldersFolderIdMoveNewParentFolderId'][0]) + public function cancelConversionRequest($list_id, string $contentType = self::contentTypes['cancelConversion'][0]) { - // verify the required parameter 'folder_id' is set - if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $folder_id when calling crmV3ListsFoldersFolderIdMoveNewParentFolderId' - ); - } - - // verify the required parameter 'new_parent_folder_id' is set - if ($new_parent_folder_id === null || (is_array($new_parent_folder_id) && count($new_parent_folder_id) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $new_parent_folder_id when calling crmV3ListsFoldersFolderIdMoveNewParentFolderId' + 'Missing the required parameter $list_id when calling cancelConversion' ); } - $resourcePath = '/crm/v3/lists/folders/{folderId}/move/{newParentFolderId}'; + $resourcePath = '/crm/v3/lists/{listId}/schedule-conversion'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - - - - // path params - if ($folder_id !== null) { - $resourcePath = str_replace( - '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folder_id), - $resourcePath - ); - } + + + // path params - if ($new_parent_folder_id !== null) { + if ($list_id !== null) { $resourcePath = str_replace( - '{' . 'newParentFolderId' . '}', - ObjectSerializer::toPathValue($new_parent_folder_id), + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($list_id), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( - ['application/json', '*/*', ], + ['*/*', ], $contentType, $multipart ); @@ -1303,7 +1288,7 @@ public function crmV3ListsFoldersFolderIdMoveNewParentFolderIdRequest($folder_id $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1311,40 +1296,34 @@ public function crmV3ListsFoldersFolderIdMoveNewParentFolderIdRequest($folder_id } /** - * Operation crmV3ListsFoldersFolderIdRename - * - * Rename a folder + * Operation create * - * @param string $folder_id The ID of the folder to rename (required) - * @param string|null $new_folder_name The new name of the folder. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderIdRename'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListCreateRequest $list_create_request list_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ListCreateResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsFoldersFolderIdRename($folder_id, $new_folder_name = null, string $contentType = self::contentTypes['crmV3ListsFoldersFolderIdRename'][0]) + public function create($list_create_request, string $contentType = self::contentTypes['create'][0]) { - list($response) = $this->crmV3ListsFoldersFolderIdRenameWithHttpInfo($folder_id, $new_folder_name, $contentType); + list($response) = $this->createWithHttpInfo($list_create_request, $contentType); return $response; } /** - * Operation crmV3ListsFoldersFolderIdRenameWithHttpInfo + * Operation createWithHttpInfo * - * Rename a folder - * - * @param string $folder_id The ID of the folder to rename (required) - * @param string|null $new_folder_name The new name of the folder. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderIdRename'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListCreateRequest $list_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ListCreateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsFoldersFolderIdRenameWithHttpInfo($folder_id, $new_folder_name = null, string $contentType = self::contentTypes['crmV3ListsFoldersFolderIdRename'][0]) + public function createWithHttpInfo($list_create_request, string $contentType = self::contentTypes['create'][0]) { - $request = $this->crmV3ListsFoldersFolderIdRenameRequest($folder_id, $new_folder_name, $contentType); + $request = $this->createRequest($list_create_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -1372,7 +1351,7 @@ public function crmV3ListsFoldersFolderIdRenameWithHttpInfo($folder_id, $new_fol switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', + '\HubSpot\Client\Crm\Lists\Model\ListCreateResponse', $request, $response, ); @@ -1400,7 +1379,7 @@ public function crmV3ListsFoldersFolderIdRenameWithHttpInfo($folder_id, $new_fol } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', + '\HubSpot\Client\Crm\Lists\Model\ListCreateResponse', $request, $response, ); @@ -1409,7 +1388,7 @@ public function crmV3ListsFoldersFolderIdRenameWithHttpInfo($folder_id, $new_fol case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', + '\HubSpot\Client\Crm\Lists\Model\ListCreateResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1430,20 +1409,17 @@ public function crmV3ListsFoldersFolderIdRenameWithHttpInfo($folder_id, $new_fol } /** - * Operation crmV3ListsFoldersFolderIdRenameAsync - * - * Rename a folder + * Operation createAsync * - * @param string $folder_id The ID of the folder to rename (required) - * @param string|null $new_folder_name The new name of the folder. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderIdRename'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListCreateRequest $list_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFoldersFolderIdRenameAsync($folder_id, $new_folder_name = null, string $contentType = self::contentTypes['crmV3ListsFoldersFolderIdRename'][0]) + public function createAsync($list_create_request, string $contentType = self::contentTypes['create'][0]) { - return $this->crmV3ListsFoldersFolderIdRenameAsyncWithHttpInfo($folder_id, $new_folder_name, $contentType) + return $this->createAsyncWithHttpInfo($list_create_request, $contentType) ->then( function ($response) { return $response[0]; @@ -1452,21 +1428,18 @@ function ($response) { } /** - * Operation crmV3ListsFoldersFolderIdRenameAsyncWithHttpInfo - * - * Rename a folder + * Operation createAsyncWithHttpInfo * - * @param string $folder_id The ID of the folder to rename (required) - * @param string|null $new_folder_name The new name of the folder. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderIdRename'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListCreateRequest $list_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFoldersFolderIdRenameAsyncWithHttpInfo($folder_id, $new_folder_name = null, string $contentType = self::contentTypes['crmV3ListsFoldersFolderIdRename'][0]) + public function createAsyncWithHttpInfo($list_create_request, string $contentType = self::contentTypes['create'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse'; - $request = $this->crmV3ListsFoldersFolderIdRenameRequest($folder_id, $new_folder_name, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ListCreateResponse'; + $request = $this->createRequest($list_create_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1505,53 +1478,34 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsFoldersFolderIdRename' + * Create request for operation 'create' * - * @param string $folder_id The ID of the folder to rename (required) - * @param string|null $new_folder_name The new name of the folder. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersFolderIdRename'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListCreateRequest $list_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsFoldersFolderIdRenameRequest($folder_id, $new_folder_name = null, string $contentType = self::contentTypes['crmV3ListsFoldersFolderIdRename'][0]) + public function createRequest($list_create_request, string $contentType = self::contentTypes['create'][0]) { - // verify the required parameter 'folder_id' is set - if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { + // verify the required parameter 'list_create_request' is set + if ($list_create_request === null || (is_array($list_create_request) && count($list_create_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $folder_id when calling crmV3ListsFoldersFolderIdRename' + 'Missing the required parameter $list_create_request when calling create' ); } - - $resourcePath = '/crm/v3/lists/folders/{folderId}/rename'; + $resourcePath = '/crm/v3/lists'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $new_folder_name, - 'newFolderName', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // path params - if ($folder_id !== null) { - $resourcePath = str_replace( - '{' . 'folderId' . '}', - ObjectSerializer::toPathValue($folder_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -1561,7 +1515,14 @@ public function crmV3ListsFoldersFolderIdRenameRequest($folder_id, $new_folder_n ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($list_create_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($list_create_request), JSON_THROW_ON_ERROR); + } else { + $httpBody = $list_create_request; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1604,7 +1565,7 @@ public function crmV3ListsFoldersFolderIdRenameRequest($folder_id, $new_folder_n $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1612,37 +1573,38 @@ public function crmV3ListsFoldersFolderIdRenameRequest($folder_id, $new_folder_n } /** - * Operation crmV3ListsFoldersMoveList + * Operation createFolder * - * Moves a list to a given folder + * Creates a folder * - * @param \HubSpot\Client\Crm\Lists\Model\ListMoveRequest $list_move_request list_move_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersMoveList'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListFolderCreateRequest $list_folder_create_request list_folder_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFolder'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return void + * @return \HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsFoldersMoveList($list_move_request, string $contentType = self::contentTypes['crmV3ListsFoldersMoveList'][0]) + public function createFolder($list_folder_create_request, string $contentType = self::contentTypes['createFolder'][0]) { - $this->crmV3ListsFoldersMoveListWithHttpInfo($list_move_request, $contentType); + list($response) = $this->createFolderWithHttpInfo($list_folder_create_request, $contentType); + return $response; } /** - * Operation crmV3ListsFoldersMoveListWithHttpInfo + * Operation createFolderWithHttpInfo * - * Moves a list to a given folder + * Creates a folder * - * @param \HubSpot\Client\Crm\Lists\Model\ListMoveRequest $list_move_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersMoveList'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListFolderCreateRequest $list_folder_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFolder'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsFoldersMoveListWithHttpInfo($list_move_request, string $contentType = self::contentTypes['crmV3ListsFoldersMoveList'][0]) + public function createFolderWithHttpInfo($list_folder_create_request, string $contentType = self::contentTypes['createFolder'][0]) { - $request = $this->crmV3ListsFoldersMoveListRequest($list_move_request, $contentType); + $request = $this->createFolderRequest($list_folder_create_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -1667,9 +1629,51 @@ public function crmV3ListsFoldersMoveListWithHttpInfo($list_move_request, string $statusCode = $response->getStatusCode(); - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\Error', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -1686,19 +1690,19 @@ public function crmV3ListsFoldersMoveListWithHttpInfo($list_move_request, string } /** - * Operation crmV3ListsFoldersMoveListAsync + * Operation createFolderAsync * - * Moves a list to a given folder + * Creates a folder * - * @param \HubSpot\Client\Crm\Lists\Model\ListMoveRequest $list_move_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersMoveList'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListFolderCreateRequest $list_folder_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFoldersMoveListAsync($list_move_request, string $contentType = self::contentTypes['crmV3ListsFoldersMoveList'][0]) + public function createFolderAsync($list_folder_create_request, string $contentType = self::contentTypes['createFolder'][0]) { - return $this->crmV3ListsFoldersMoveListAsyncWithHttpInfo($list_move_request, $contentType) + return $this->createFolderAsyncWithHttpInfo($list_folder_create_request, $contentType) ->then( function ($response) { return $response[0]; @@ -1707,26 +1711,39 @@ function ($response) { } /** - * Operation crmV3ListsFoldersMoveListAsyncWithHttpInfo + * Operation createFolderAsyncWithHttpInfo * - * Moves a list to a given folder + * Creates a folder * - * @param \HubSpot\Client\Crm\Lists\Model\ListMoveRequest $list_move_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersMoveList'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListFolderCreateRequest $list_folder_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFoldersMoveListAsyncWithHttpInfo($list_move_request, string $contentType = self::contentTypes['crmV3ListsFoldersMoveList'][0]) + public function createFolderAsyncWithHttpInfo($list_folder_create_request, string $contentType = self::contentTypes['createFolder'][0]) { - $returnType = ''; - $request = $this->crmV3ListsFoldersMoveListRequest($list_move_request, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse'; + $request = $this->createFolderRequest($list_folder_create_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -1746,26 +1763,26 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsFoldersMoveList' + * Create request for operation 'createFolder' * - * @param \HubSpot\Client\Crm\Lists\Model\ListMoveRequest $list_move_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFoldersMoveList'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListFolderCreateRequest $list_folder_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['createFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsFoldersMoveListRequest($list_move_request, string $contentType = self::contentTypes['crmV3ListsFoldersMoveList'][0]) + public function createFolderRequest($list_folder_create_request, string $contentType = self::contentTypes['createFolder'][0]) { - // verify the required parameter 'list_move_request' is set - if ($list_move_request === null || (is_array($list_move_request) && count($list_move_request) === 0)) { + // verify the required parameter 'list_folder_create_request' is set + if ($list_folder_create_request === null || (is_array($list_folder_create_request) && count($list_folder_create_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_move_request when calling crmV3ListsFoldersMoveList' + 'Missing the required parameter $list_folder_create_request when calling createFolder' ); } - $resourcePath = '/crm/v3/lists/folders/move-list'; + $resourcePath = '/crm/v3/lists/folders'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1777,18 +1794,18 @@ public function crmV3ListsFoldersMoveListRequest($list_move_request, string $con $headers = $this->headerSelector->selectHeaders( - ['*/*', ], + ['application/json', '*/*', ], $contentType, $multipart ); // for model (json/xml) - if (isset($list_move_request)) { + if (isset($list_folder_create_request)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($list_move_request), JSON_THROW_ON_ERROR); + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($list_folder_create_request), JSON_THROW_ON_ERROR); } else { - $httpBody = $list_move_request; + $httpBody = $list_folder_create_request; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -1833,7 +1850,7 @@ public function crmV3ListsFoldersMoveListRequest($list_move_request, string $con $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -1841,38 +1858,36 @@ public function crmV3ListsFoldersMoveListRequest($list_move_request, string $con } /** - * Operation crmV3ListsFolders_0 - * - * Creates a folder + * Operation getAll * - * @param \HubSpot\Client\Crm\Lists\Model\ListFolderCreateRequest $list_folder_create_request list_folder_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFolders_0'] to see the possible values for this operation + * @param string[]|null $list_ids list_ids (optional) + * @param bool|null $include_filters include_filters (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAll'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ListsByIdResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsFolders_0($list_folder_create_request, string $contentType = self::contentTypes['crmV3ListsFolders_0'][0]) + public function getAll($list_ids = null, $include_filters = false, string $contentType = self::contentTypes['getAll'][0]) { - list($response) = $this->crmV3ListsFolders_0WithHttpInfo($list_folder_create_request, $contentType); + list($response) = $this->getAllWithHttpInfo($list_ids, $include_filters, $contentType); return $response; } /** - * Operation crmV3ListsFolders_0WithHttpInfo - * - * Creates a folder + * Operation getAllWithHttpInfo * - * @param \HubSpot\Client\Crm\Lists\Model\ListFolderCreateRequest $list_folder_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFolders_0'] to see the possible values for this operation + * @param string[]|null $list_ids (optional) + * @param bool|null $include_filters (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAll'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ListsByIdResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsFolders_0WithHttpInfo($list_folder_create_request, string $contentType = self::contentTypes['crmV3ListsFolders_0'][0]) + public function getAllWithHttpInfo($list_ids = null, $include_filters = false, string $contentType = self::contentTypes['getAll'][0]) { - $request = $this->crmV3ListsFolders_0Request($list_folder_create_request, $contentType); + $request = $this->getAllRequest($list_ids, $include_filters, $contentType); try { $options = $this->createHttpClientOption(); @@ -1900,7 +1915,7 @@ public function crmV3ListsFolders_0WithHttpInfo($list_folder_create_request, str switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse', + '\HubSpot\Client\Crm\Lists\Model\ListsByIdResponse', $request, $response, ); @@ -1928,7 +1943,7 @@ public function crmV3ListsFolders_0WithHttpInfo($list_folder_create_request, str } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse', + '\HubSpot\Client\Crm\Lists\Model\ListsByIdResponse', $request, $response, ); @@ -1937,7 +1952,7 @@ public function crmV3ListsFolders_0WithHttpInfo($list_folder_create_request, str case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse', + '\HubSpot\Client\Crm\Lists\Model\ListsByIdResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1958,19 +1973,18 @@ public function crmV3ListsFolders_0WithHttpInfo($list_folder_create_request, str } /** - * Operation crmV3ListsFolders_0Async - * - * Creates a folder + * Operation getAllAsync * - * @param \HubSpot\Client\Crm\Lists\Model\ListFolderCreateRequest $list_folder_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFolders_0'] to see the possible values for this operation + * @param string[]|null $list_ids (optional) + * @param bool|null $include_filters (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAll'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFolders_0Async($list_folder_create_request, string $contentType = self::contentTypes['crmV3ListsFolders_0'][0]) + public function getAllAsync($list_ids = null, $include_filters = false, string $contentType = self::contentTypes['getAll'][0]) { - return $this->crmV3ListsFolders_0AsyncWithHttpInfo($list_folder_create_request, $contentType) + return $this->getAllAsyncWithHttpInfo($list_ids, $include_filters, $contentType) ->then( function ($response) { return $response[0]; @@ -1979,20 +1993,19 @@ function ($response) { } /** - * Operation crmV3ListsFolders_0AsyncWithHttpInfo + * Operation getAllAsyncWithHttpInfo * - * Creates a folder - * - * @param \HubSpot\Client\Crm\Lists\Model\ListFolderCreateRequest $list_folder_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFolders_0'] to see the possible values for this operation + * @param string[]|null $list_ids (optional) + * @param bool|null $include_filters (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAll'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsFolders_0AsyncWithHttpInfo($list_folder_create_request, string $contentType = self::contentTypes['crmV3ListsFolders_0'][0]) + public function getAllAsyncWithHttpInfo($list_ids = null, $include_filters = false, string $contentType = self::contentTypes['getAll'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFolderCreateResponse'; - $request = $this->crmV3ListsFolders_0Request($list_folder_create_request, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ListsByIdResponse'; + $request = $this->getAllRequest($list_ids, $include_filters, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2031,32 +2044,46 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsFolders_0' + * Create request for operation 'getAll' * - * @param \HubSpot\Client\Crm\Lists\Model\ListFolderCreateRequest $list_folder_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsFolders_0'] to see the possible values for this operation + * @param string[]|null $list_ids (optional) + * @param bool|null $include_filters (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAll'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsFolders_0Request($list_folder_create_request, string $contentType = self::contentTypes['crmV3ListsFolders_0'][0]) + public function getAllRequest($list_ids = null, $include_filters = false, string $contentType = self::contentTypes['getAll'][0]) { - // verify the required parameter 'list_folder_create_request' is set - if ($list_folder_create_request === null || (is_array($list_folder_create_request) && count($list_folder_create_request) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $list_folder_create_request when calling crmV3ListsFolders_0' - ); - } - $resourcePath = '/crm/v3/lists/folders'; + + $resourcePath = '/crm/v3/lists'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $list_ids, + 'listIds', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include_filters, + 'includeFilters', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); @@ -2064,18 +2091,11 @@ public function crmV3ListsFolders_0Request($list_folder_create_request, string $ $headers = $this->headerSelector->selectHeaders( ['application/json', '*/*', ], $contentType, - $multipart - ); - - // for model (json/xml) - if (isset($list_folder_create_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($list_folder_create_request), JSON_THROW_ON_ERROR); - } else { - $httpBody = $list_folder_create_request; - } - } elseif (count($formParams) > 0) { + $multipart + ); + + // for model (json/xml) + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -2118,7 +2138,7 @@ public function crmV3ListsFolders_0Request($list_folder_create_request, string $ $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -2126,38 +2146,38 @@ public function crmV3ListsFolders_0Request($list_folder_create_request, string $ } /** - * Operation crmV3ListsIdmapping + * Operation getAllFolders * - * Translate Legacy List Id to Modern List Id + * Retrieves a folder. * - * @param string|null $legacy_list_id The legacy list id from lists v1 API. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsIdmapping'] to see the possible values for this operation + * @param string|null $folder_id The Id of the folder to retrieve. (optional, default to '0') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllFolders'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsIdmapping($legacy_list_id = null, string $contentType = self::contentTypes['crmV3ListsIdmapping'][0]) + public function getAllFolders($folder_id = '0', string $contentType = self::contentTypes['getAllFolders'][0]) { - list($response) = $this->crmV3ListsIdmappingWithHttpInfo($legacy_list_id, $contentType); + list($response) = $this->getAllFoldersWithHttpInfo($folder_id, $contentType); return $response; } /** - * Operation crmV3ListsIdmappingWithHttpInfo + * Operation getAllFoldersWithHttpInfo * - * Translate Legacy List Id to Modern List Id + * Retrieves a folder. * - * @param string|null $legacy_list_id The legacy list id from lists v1 API. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsIdmapping'] to see the possible values for this operation + * @param string|null $folder_id The Id of the folder to retrieve. (optional, default to '0') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllFolders'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsIdmappingWithHttpInfo($legacy_list_id = null, string $contentType = self::contentTypes['crmV3ListsIdmapping'][0]) + public function getAllFoldersWithHttpInfo($folder_id = '0', string $contentType = self::contentTypes['getAllFolders'][0]) { - $request = $this->crmV3ListsIdmappingRequest($legacy_list_id, $contentType); + $request = $this->getAllFoldersRequest($folder_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2185,7 +2205,7 @@ public function crmV3ListsIdmappingWithHttpInfo($legacy_list_id = null, string $ switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping', + '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', $request, $response, ); @@ -2213,7 +2233,7 @@ public function crmV3ListsIdmappingWithHttpInfo($legacy_list_id = null, string $ } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping', + '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', $request, $response, ); @@ -2222,7 +2242,7 @@ public function crmV3ListsIdmappingWithHttpInfo($legacy_list_id = null, string $ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping', + '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2243,19 +2263,19 @@ public function crmV3ListsIdmappingWithHttpInfo($legacy_list_id = null, string $ } /** - * Operation crmV3ListsIdmappingAsync + * Operation getAllFoldersAsync * - * Translate Legacy List Id to Modern List Id + * Retrieves a folder. * - * @param string|null $legacy_list_id The legacy list id from lists v1 API. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsIdmapping'] to see the possible values for this operation + * @param string|null $folder_id The Id of the folder to retrieve. (optional, default to '0') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllFolders'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsIdmappingAsync($legacy_list_id = null, string $contentType = self::contentTypes['crmV3ListsIdmapping'][0]) + public function getAllFoldersAsync($folder_id = '0', string $contentType = self::contentTypes['getAllFolders'][0]) { - return $this->crmV3ListsIdmappingAsyncWithHttpInfo($legacy_list_id, $contentType) + return $this->getAllFoldersAsyncWithHttpInfo($folder_id, $contentType) ->then( function ($response) { return $response[0]; @@ -2264,20 +2284,20 @@ function ($response) { } /** - * Operation crmV3ListsIdmappingAsyncWithHttpInfo + * Operation getAllFoldersAsyncWithHttpInfo * - * Translate Legacy List Id to Modern List Id + * Retrieves a folder. * - * @param string|null $legacy_list_id The legacy list id from lists v1 API. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsIdmapping'] to see the possible values for this operation + * @param string|null $folder_id The Id of the folder to retrieve. (optional, default to '0') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllFolders'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsIdmappingAsyncWithHttpInfo($legacy_list_id = null, string $contentType = self::contentTypes['crmV3ListsIdmapping'][0]) + public function getAllFoldersAsyncWithHttpInfo($folder_id = '0', string $contentType = self::contentTypes['getAllFolders'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping'; - $request = $this->crmV3ListsIdmappingRequest($legacy_list_id, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse'; + $request = $this->getAllFoldersRequest($folder_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2316,20 +2336,20 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsIdmapping' + * Create request for operation 'getAllFolders' * - * @param string|null $legacy_list_id The legacy list id from lists v1 API. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsIdmapping'] to see the possible values for this operation + * @param string|null $folder_id The Id of the folder to retrieve. (optional, default to '0') + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAllFolders'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsIdmappingRequest($legacy_list_id = null, string $contentType = self::contentTypes['crmV3ListsIdmapping'][0]) + public function getAllFoldersRequest($folder_id = '0', string $contentType = self::contentTypes['getAllFolders'][0]) { - $resourcePath = '/crm/v3/lists/idmapping'; + $resourcePath = '/crm/v3/lists/folders'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2338,8 +2358,8 @@ public function crmV3ListsIdmappingRequest($legacy_list_id = null, string $conte // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $legacy_list_id, - 'legacyListId', // param base name + $folder_id, + 'folderId', // param base name 'string', // openApiType 'form', // style true, // explode @@ -2407,38 +2427,40 @@ public function crmV3ListsIdmappingRequest($legacy_list_id = null, string $conte } /** - * Operation crmV3ListsIdmapping_0 + * Operation getById * - * Translate Legacy List Id to Modern List Id in Batch + * Fetch List by ID * - * @param string[] $request_body request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsIdmapping_0'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to fetch. (required) + * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ListFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsIdmapping_0($request_body, string $contentType = self::contentTypes['crmV3ListsIdmapping_0'][0]) + public function getById($list_id, $include_filters = false, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->crmV3ListsIdmapping_0WithHttpInfo($request_body, $contentType); + list($response) = $this->getByIdWithHttpInfo($list_id, $include_filters, $contentType); return $response; } /** - * Operation crmV3ListsIdmapping_0WithHttpInfo + * Operation getByIdWithHttpInfo * - * Translate Legacy List Id to Modern List Id in Batch + * Fetch List by ID * - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsIdmapping_0'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to fetch. (required) + * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ListFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsIdmapping_0WithHttpInfo($request_body, string $contentType = self::contentTypes['crmV3ListsIdmapping_0'][0]) + public function getByIdWithHttpInfo($list_id, $include_filters = false, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->crmV3ListsIdmapping_0Request($request_body, $contentType); + $request = $this->getByIdRequest($list_id, $include_filters, $contentType); try { $options = $this->createHttpClientOption(); @@ -2466,7 +2488,7 @@ public function crmV3ListsIdmapping_0WithHttpInfo($request_body, string $content switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping', + '\HubSpot\Client\Crm\Lists\Model\ListFetchResponse', $request, $response, ); @@ -2494,7 +2516,7 @@ public function crmV3ListsIdmapping_0WithHttpInfo($request_body, string $content } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping', + '\HubSpot\Client\Crm\Lists\Model\ListFetchResponse', $request, $response, ); @@ -2503,7 +2525,7 @@ public function crmV3ListsIdmapping_0WithHttpInfo($request_body, string $content case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping', + '\HubSpot\Client\Crm\Lists\Model\ListFetchResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -2524,19 +2546,20 @@ public function crmV3ListsIdmapping_0WithHttpInfo($request_body, string $content } /** - * Operation crmV3ListsIdmapping_0Async + * Operation getByIdAsync * - * Translate Legacy List Id to Modern List Id in Batch + * Fetch List by ID * - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsIdmapping_0'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to fetch. (required) + * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsIdmapping_0Async($request_body, string $contentType = self::contentTypes['crmV3ListsIdmapping_0'][0]) + public function getByIdAsync($list_id, $include_filters = false, string $contentType = self::contentTypes['getById'][0]) { - return $this->crmV3ListsIdmapping_0AsyncWithHttpInfo($request_body, $contentType) + return $this->getByIdAsyncWithHttpInfo($list_id, $include_filters, $contentType) ->then( function ($response) { return $response[0]; @@ -2545,20 +2568,21 @@ function ($response) { } /** - * Operation crmV3ListsIdmapping_0AsyncWithHttpInfo + * Operation getByIdAsyncWithHttpInfo * - * Translate Legacy List Id to Modern List Id in Batch + * Fetch List by ID * - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsIdmapping_0'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to fetch. (required) + * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsIdmapping_0AsyncWithHttpInfo($request_body, string $contentType = self::contentTypes['crmV3ListsIdmapping_0'][0]) + public function getByIdAsyncWithHttpInfo($list_id, $include_filters = false, string $contentType = self::contentTypes['getById'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping'; - $request = $this->crmV3ListsIdmapping_0Request($request_body, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFetchResponse'; + $request = $this->getByIdRequest($list_id, $include_filters, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2597,34 +2621,53 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsIdmapping_0' + * Create request for operation 'getById' * - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsIdmapping_0'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to fetch. (required) + * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsIdmapping_0Request($request_body, string $contentType = self::contentTypes['crmV3ListsIdmapping_0'][0]) + public function getByIdRequest($list_id, $include_filters = false, string $contentType = self::contentTypes['getById'][0]) { - // verify the required parameter 'request_body' is set - if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $request_body when calling crmV3ListsIdmapping_0' + 'Missing the required parameter $list_id when calling getById' ); } - $resourcePath = '/crm/v3/lists/idmapping'; + + $resourcePath = '/crm/v3/lists/{listId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include_filters, + 'includeFilters', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // path params + if ($list_id !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($list_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -2634,14 +2677,7 @@ public function crmV3ListsIdmapping_0Request($request_body, string $contentType ); // for model (json/xml) - if (isset($request_body)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($request_body), JSON_THROW_ON_ERROR); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -2684,7 +2720,7 @@ public function crmV3ListsIdmapping_0Request($request_body, string $contentType $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -2692,40 +2728,42 @@ public function crmV3ListsIdmapping_0Request($request_body, string $contentType } /** - * Operation crmV3ListsListId + * Operation getByName * - * Fetch List by ID + * Retrieve List by Name * - * @param string $list_id The **ILS ID** of the list to fetch. (required) + * @param string $list_name The name of the list to fetch. This is **not** case sensitive. (required) + * @param string $object_type_id The object type ID of the object types stored by the list to fetch. For example, `0-1` for a `CONTACT` list. (required) * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListId'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByName'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Lists\Model\ListFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListId($list_id, $include_filters = false, string $contentType = self::contentTypes['crmV3ListsListId'][0]) + public function getByName($list_name, $object_type_id, $include_filters = false, string $contentType = self::contentTypes['getByName'][0]) { - list($response) = $this->crmV3ListsListIdWithHttpInfo($list_id, $include_filters, $contentType); + list($response) = $this->getByNameWithHttpInfo($list_name, $object_type_id, $include_filters, $contentType); return $response; } /** - * Operation crmV3ListsListIdWithHttpInfo + * Operation getByNameWithHttpInfo * - * Fetch List by ID + * Retrieve List by Name * - * @param string $list_id The **ILS ID** of the list to fetch. (required) + * @param string $list_name The name of the list to fetch. This is **not** case sensitive. (required) + * @param string $object_type_id The object type ID of the object types stored by the list to fetch. For example, `0-1` for a `CONTACT` list. (required) * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListId'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByName'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Lists\Model\ListFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdWithHttpInfo($list_id, $include_filters = false, string $contentType = self::contentTypes['crmV3ListsListId'][0]) + public function getByNameWithHttpInfo($list_name, $object_type_id, $include_filters = false, string $contentType = self::contentTypes['getByName'][0]) { - $request = $this->crmV3ListsListIdRequest($list_id, $include_filters, $contentType); + $request = $this->getByNameRequest($list_name, $object_type_id, $include_filters, $contentType); try { $options = $this->createHttpClientOption(); @@ -2811,20 +2849,21 @@ public function crmV3ListsListIdWithHttpInfo($list_id, $include_filters = false, } /** - * Operation crmV3ListsListIdAsync + * Operation getByNameAsync * - * Fetch List by ID + * Retrieve List by Name * - * @param string $list_id The **ILS ID** of the list to fetch. (required) + * @param string $list_name The name of the list to fetch. This is **not** case sensitive. (required) + * @param string $object_type_id The object type ID of the object types stored by the list to fetch. For example, `0-1` for a `CONTACT` list. (required) * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListId'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByName'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdAsync($list_id, $include_filters = false, string $contentType = self::contentTypes['crmV3ListsListId'][0]) + public function getByNameAsync($list_name, $object_type_id, $include_filters = false, string $contentType = self::contentTypes['getByName'][0]) { - return $this->crmV3ListsListIdAsyncWithHttpInfo($list_id, $include_filters, $contentType) + return $this->getByNameAsyncWithHttpInfo($list_name, $object_type_id, $include_filters, $contentType) ->then( function ($response) { return $response[0]; @@ -2833,21 +2872,22 @@ function ($response) { } /** - * Operation crmV3ListsListIdAsyncWithHttpInfo + * Operation getByNameAsyncWithHttpInfo * - * Fetch List by ID + * Retrieve List by Name * - * @param string $list_id The **ILS ID** of the list to fetch. (required) + * @param string $list_name The name of the list to fetch. This is **not** case sensitive. (required) + * @param string $object_type_id The object type ID of the object types stored by the list to fetch. For example, `0-1` for a `CONTACT` list. (required) * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListId'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByName'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdAsyncWithHttpInfo($list_id, $include_filters = false, string $contentType = self::contentTypes['crmV3ListsListId'][0]) + public function getByNameAsyncWithHttpInfo($list_name, $object_type_id, $include_filters = false, string $contentType = self::contentTypes['getByName'][0]) { $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFetchResponse'; - $request = $this->crmV3ListsListIdRequest($list_id, $include_filters, $contentType); + $request = $this->getByNameRequest($list_name, $object_type_id, $include_filters, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2886,28 +2926,36 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListId' + * Create request for operation 'getByName' * - * @param string $list_id The **ILS ID** of the list to fetch. (required) + * @param string $list_name The name of the list to fetch. This is **not** case sensitive. (required) + * @param string $object_type_id The object type ID of the object types stored by the list to fetch. For example, `0-1` for a `CONTACT` list. (required) * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListId'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByName'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdRequest($list_id, $include_filters = false, string $contentType = self::contentTypes['crmV3ListsListId'][0]) + public function getByNameRequest($list_name, $object_type_id, $include_filters = false, string $contentType = self::contentTypes['getByName'][0]) { - // verify the required parameter 'list_id' is set - if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { + // verify the required parameter 'list_name' is set + if ($list_name === null || (is_array($list_name) && count($list_name) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $list_name when calling getByName' + ); + } + + // verify the required parameter 'object_type_id' is set + if ($object_type_id === null || (is_array($object_type_id) && count($object_type_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListId' + 'Missing the required parameter $object_type_id when calling getByName' ); } - $resourcePath = '/crm/v3/lists/{listId}'; + $resourcePath = '/crm/v3/lists/object-type-id/{objectTypeId}/name/{listName}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -2926,10 +2974,18 @@ public function crmV3ListsListIdRequest($list_id, $include_filters = false, stri // path params - if ($list_id !== null) { + if ($list_name !== null) { $resourcePath = str_replace( - '{' . 'listId' . '}', - ObjectSerializer::toPathValue($list_id), + '{' . 'listName' . '}', + ObjectSerializer::toPathValue($list_name), + $resourcePath + ); + } + // path params + if ($object_type_id !== null) { + $resourcePath = str_replace( + '{' . 'objectTypeId' . '}', + ObjectSerializer::toPathValue($object_type_id), $resourcePath ); } @@ -2993,44 +3049,38 @@ public function crmV3ListsListIdRequest($list_id, $include_filters = false, stri } /** - * Operation crmV3ListsListIdMemberships + * Operation getConversionDetails * - * Fetch List Memberships Ordered by ID + * Retrieve the conversion details for a list * - * @param string $list_id The **ILS ID** of the list. (required) - * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) - * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) - * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMemberships'] to see the possible values for this operation + * @param string $list_id The ID of the list to schedule the conversion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConversionDetails'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListIdMemberships($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['crmV3ListsListIdMemberships'][0]) + public function getConversionDetails($list_id, string $contentType = self::contentTypes['getConversionDetails'][0]) { - list($response) = $this->crmV3ListsListIdMembershipsWithHttpInfo($list_id, $after, $before, $limit, $contentType); + list($response) = $this->getConversionDetailsWithHttpInfo($list_id, $contentType); return $response; } /** - * Operation crmV3ListsListIdMembershipsWithHttpInfo + * Operation getConversionDetailsWithHttpInfo * - * Fetch List Memberships Ordered by ID + * Retrieve the conversion details for a list * - * @param string $list_id The **ILS ID** of the list. (required) - * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) - * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) - * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMemberships'] to see the possible values for this operation + * @param string $list_id The ID of the list to schedule the conversion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConversionDetails'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdMembershipsWithHttpInfo($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['crmV3ListsListIdMemberships'][0]) + public function getConversionDetailsWithHttpInfo($list_id, string $contentType = self::contentTypes['getConversionDetails'][0]) { - $request = $this->crmV3ListsListIdMembershipsRequest($list_id, $after, $before, $limit, $contentType); + $request = $this->getConversionDetailsRequest($list_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -3058,7 +3108,7 @@ public function crmV3ListsListIdMembershipsWithHttpInfo($list_id, $after = null, switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', + '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', $request, $response, ); @@ -3086,7 +3136,7 @@ public function crmV3ListsListIdMembershipsWithHttpInfo($list_id, $after = null, } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', + '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', $request, $response, ); @@ -3095,7 +3145,7 @@ public function crmV3ListsListIdMembershipsWithHttpInfo($list_id, $after = null, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', + '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3116,22 +3166,19 @@ public function crmV3ListsListIdMembershipsWithHttpInfo($list_id, $after = null, } /** - * Operation crmV3ListsListIdMembershipsAsync + * Operation getConversionDetailsAsync * - * Fetch List Memberships Ordered by ID + * Retrieve the conversion details for a list * - * @param string $list_id The **ILS ID** of the list. (required) - * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) - * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) - * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMemberships'] to see the possible values for this operation + * @param string $list_id The ID of the list to schedule the conversion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConversionDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsAsync($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['crmV3ListsListIdMemberships'][0]) + public function getConversionDetailsAsync($list_id, string $contentType = self::contentTypes['getConversionDetails'][0]) { - return $this->crmV3ListsListIdMembershipsAsyncWithHttpInfo($list_id, $after, $before, $limit, $contentType) + return $this->getConversionDetailsAsyncWithHttpInfo($list_id, $contentType) ->then( function ($response) { return $response[0]; @@ -3140,23 +3187,20 @@ function ($response) { } /** - * Operation crmV3ListsListIdMembershipsAsyncWithHttpInfo + * Operation getConversionDetailsAsyncWithHttpInfo * - * Fetch List Memberships Ordered by ID + * Retrieve the conversion details for a list * - * @param string $list_id The **ILS ID** of the list. (required) - * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) - * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) - * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMemberships'] to see the possible values for this operation + * @param string $list_id The ID of the list to schedule the conversion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConversionDetails'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsAsyncWithHttpInfo($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['crmV3ListsListIdMemberships'][0]) + public function getConversionDetailsAsyncWithHttpInfo($list_id, string $contentType = self::contentTypes['getConversionDetails'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId'; - $request = $this->crmV3ListsListIdMembershipsRequest($list_id, $after, $before, $limit, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse'; + $request = $this->getConversionDetailsRequest($list_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3195,65 +3239,32 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdMemberships' + * Create request for operation 'getConversionDetails' * - * @param string $list_id The **ILS ID** of the list. (required) - * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) - * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) - * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMemberships'] to see the possible values for this operation + * @param string $list_id The ID of the list to schedule the conversion for. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getConversionDetails'] to see the possible values for this operation * - * @throws \InvalidArgumentException - * @return \GuzzleHttp\Psr7\Request - */ - public function crmV3ListsListIdMembershipsRequest($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['crmV3ListsListIdMemberships'][0]) - { - - // verify the required parameter 'list_id' is set - if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdMemberships' - ); - } - - - - - - $resourcePath = '/crm/v3/lists/{listId}/memberships'; - $formParams = []; - $queryParams = []; - $headerParams = []; - $httpBody = ''; - $multipart = false; - - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $before, - 'before', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + * @throws \InvalidArgumentException + * @return \GuzzleHttp\Psr7\Request + */ + public function getConversionDetailsRequest($list_id, string $contentType = self::contentTypes['getConversionDetails'][0]) + { + + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $list_id when calling getConversionDetails' + ); + } + + + $resourcePath = '/crm/v3/lists/{listId}/schedule-conversion'; + $formParams = []; + $queryParams = []; + $headerParams = []; + $httpBody = ''; + $multipart = false; + // path params @@ -3324,40 +3335,40 @@ public function crmV3ListsListIdMembershipsRequest($list_id, $after = null, $bef } /** - * Operation crmV3ListsListIdMembershipsAdd + * Operation getLists * - * Add Records to a List + * Get lists record is member of * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string[] $request_body request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAdd'] to see the possible values for this operation + * @param string $object_type_id Object type id of the record (required) + * @param string $record_id Id of the record (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLists'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListIdMembershipsAdd($list_id, $request_body, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAdd'][0]) + public function getLists($object_type_id, $record_id, string $contentType = self::contentTypes['getLists'][0]) { - list($response) = $this->crmV3ListsListIdMembershipsAddWithHttpInfo($list_id, $request_body, $contentType); + list($response) = $this->getListsWithHttpInfo($object_type_id, $record_id, $contentType); return $response; } /** - * Operation crmV3ListsListIdMembershipsAddWithHttpInfo + * Operation getListsWithHttpInfo * - * Add Records to a List + * Get lists record is member of * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAdd'] to see the possible values for this operation + * @param string $object_type_id Object type id of the record (required) + * @param string $record_id Id of the record (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLists'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdMembershipsAddWithHttpInfo($list_id, $request_body, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAdd'][0]) + public function getListsWithHttpInfo($object_type_id, $record_id, string $contentType = self::contentTypes['getLists'][0]) { - $request = $this->crmV3ListsListIdMembershipsAddRequest($list_id, $request_body, $contentType); + $request = $this->getListsRequest($object_type_id, $record_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -3385,7 +3396,7 @@ public function crmV3ListsListIdMembershipsAddWithHttpInfo($list_id, $request_bo switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership', $request, $response, ); @@ -3413,7 +3424,7 @@ public function crmV3ListsListIdMembershipsAddWithHttpInfo($list_id, $request_bo } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership', $request, $response, ); @@ -3422,7 +3433,7 @@ public function crmV3ListsListIdMembershipsAddWithHttpInfo($list_id, $request_bo case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3443,20 +3454,20 @@ public function crmV3ListsListIdMembershipsAddWithHttpInfo($list_id, $request_bo } /** - * Operation crmV3ListsListIdMembershipsAddAsync + * Operation getListsAsync * - * Add Records to a List + * Get lists record is member of * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAdd'] to see the possible values for this operation + * @param string $object_type_id Object type id of the record (required) + * @param string $record_id Id of the record (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLists'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsAddAsync($list_id, $request_body, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAdd'][0]) + public function getListsAsync($object_type_id, $record_id, string $contentType = self::contentTypes['getLists'][0]) { - return $this->crmV3ListsListIdMembershipsAddAsyncWithHttpInfo($list_id, $request_body, $contentType) + return $this->getListsAsyncWithHttpInfo($object_type_id, $record_id, $contentType) ->then( function ($response) { return $response[0]; @@ -3465,21 +3476,21 @@ function ($response) { } /** - * Operation crmV3ListsListIdMembershipsAddAsyncWithHttpInfo + * Operation getListsAsyncWithHttpInfo * - * Add Records to a List + * Get lists record is member of * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAdd'] to see the possible values for this operation + * @param string $object_type_id Object type id of the record (required) + * @param string $record_id Id of the record (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLists'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsAddAsyncWithHttpInfo($list_id, $request_body, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAdd'][0]) + public function getListsAsyncWithHttpInfo($object_type_id, $record_id, string $contentType = self::contentTypes['getLists'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse'; - $request = $this->crmV3ListsListIdMembershipsAddRequest($list_id, $request_body, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership'; + $request = $this->getListsRequest($object_type_id, $record_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3518,34 +3529,34 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdMembershipsAdd' + * Create request for operation 'getLists' * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAdd'] to see the possible values for this operation + * @param string $object_type_id Object type id of the record (required) + * @param string $record_id Id of the record (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getLists'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdMembershipsAddRequest($list_id, $request_body, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAdd'][0]) + public function getListsRequest($object_type_id, $record_id, string $contentType = self::contentTypes['getLists'][0]) { - // verify the required parameter 'list_id' is set - if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { + // verify the required parameter 'object_type_id' is set + if ($object_type_id === null || (is_array($object_type_id) && count($object_type_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdMembershipsAdd' + 'Missing the required parameter $object_type_id when calling getLists' ); } - // verify the required parameter 'request_body' is set - if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { + // verify the required parameter 'record_id' is set + if ($record_id === null || (is_array($record_id) && count($record_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $request_body when calling crmV3ListsListIdMembershipsAdd' + 'Missing the required parameter $record_id when calling getLists' ); } - $resourcePath = '/crm/v3/lists/{listId}/memberships/add'; + $resourcePath = '/crm/v3/lists/records/{objectTypeId}/{recordId}/memberships'; $formParams = []; $queryParams = []; $headerParams = []; @@ -3555,10 +3566,18 @@ public function crmV3ListsListIdMembershipsAddRequest($list_id, $request_body, s // path params - if ($list_id !== null) { + if ($object_type_id !== null) { $resourcePath = str_replace( - '{' . 'listId' . '}', - ObjectSerializer::toPathValue($list_id), + '{' . 'objectTypeId' . '}', + ObjectSerializer::toPathValue($object_type_id), + $resourcePath + ); + } + // path params + if ($record_id !== null) { + $resourcePath = str_replace( + '{' . 'recordId' . '}', + ObjectSerializer::toPathValue($record_id), $resourcePath ); } @@ -3571,14 +3590,7 @@ public function crmV3ListsListIdMembershipsAddRequest($list_id, $request_body, s ); // for model (json/xml) - if (isset($request_body)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($request_body), JSON_THROW_ON_ERROR); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -3621,7 +3633,7 @@ public function crmV3ListsListIdMembershipsAddRequest($list_id, $request_body, s $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3629,40 +3641,44 @@ public function crmV3ListsListIdMembershipsAddRequest($list_id, $request_body, s } /** - * Operation crmV3ListsListIdMembershipsAddAndRemove + * Operation getPage * - * Add and/or Remove Records from a List + * Fetch List Memberships Ordered by ID * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param \HubSpot\Client\Crm\Lists\Model\MembershipChangeRequest $membership_change_request membership_change_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAddAndRemove'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list. (required) + * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) + * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) + * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListIdMembershipsAddAndRemove($list_id, $membership_change_request, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAddAndRemove'][0]) + public function getPage($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->crmV3ListsListIdMembershipsAddAndRemoveWithHttpInfo($list_id, $membership_change_request, $contentType); + list($response) = $this->getPageWithHttpInfo($list_id, $after, $before, $limit, $contentType); return $response; } /** - * Operation crmV3ListsListIdMembershipsAddAndRemoveWithHttpInfo + * Operation getPageWithHttpInfo * - * Add and/or Remove Records from a List + * Fetch List Memberships Ordered by ID * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param \HubSpot\Client\Crm\Lists\Model\MembershipChangeRequest $membership_change_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAddAndRemove'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list. (required) + * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) + * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) + * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdMembershipsAddAndRemoveWithHttpInfo($list_id, $membership_change_request, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAddAndRemove'][0]) + public function getPageWithHttpInfo($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->crmV3ListsListIdMembershipsAddAndRemoveRequest($list_id, $membership_change_request, $contentType); + $request = $this->getPageRequest($list_id, $after, $before, $limit, $contentType); try { $options = $this->createHttpClientOption(); @@ -3690,7 +3706,7 @@ public function crmV3ListsListIdMembershipsAddAndRemoveWithHttpInfo($list_id, $m switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', $request, $response, ); @@ -3718,7 +3734,7 @@ public function crmV3ListsListIdMembershipsAddAndRemoveWithHttpInfo($list_id, $m } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', $request, $response, ); @@ -3727,7 +3743,7 @@ public function crmV3ListsListIdMembershipsAddAndRemoveWithHttpInfo($list_id, $m case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -3748,20 +3764,22 @@ public function crmV3ListsListIdMembershipsAddAndRemoveWithHttpInfo($list_id, $m } /** - * Operation crmV3ListsListIdMembershipsAddAndRemoveAsync + * Operation getPageAsync * - * Add and/or Remove Records from a List + * Fetch List Memberships Ordered by ID * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param \HubSpot\Client\Crm\Lists\Model\MembershipChangeRequest $membership_change_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAddAndRemove'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list. (required) + * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) + * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) + * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsAddAndRemoveAsync($list_id, $membership_change_request, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAddAndRemove'][0]) + public function getPageAsync($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['getPage'][0]) { - return $this->crmV3ListsListIdMembershipsAddAndRemoveAsyncWithHttpInfo($list_id, $membership_change_request, $contentType) + return $this->getPageAsyncWithHttpInfo($list_id, $after, $before, $limit, $contentType) ->then( function ($response) { return $response[0]; @@ -3770,21 +3788,23 @@ function ($response) { } /** - * Operation crmV3ListsListIdMembershipsAddAndRemoveAsyncWithHttpInfo + * Operation getPageAsyncWithHttpInfo * - * Add and/or Remove Records from a List + * Fetch List Memberships Ordered by ID * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param \HubSpot\Client\Crm\Lists\Model\MembershipChangeRequest $membership_change_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAddAndRemove'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list. (required) + * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) + * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) + * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsAddAndRemoveAsyncWithHttpInfo($list_id, $membership_change_request, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAddAndRemove'][0]) + public function getPageAsyncWithHttpInfo($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['getPage'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse'; - $request = $this->crmV3ListsListIdMembershipsAddAndRemoveRequest($list_id, $membership_change_request, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId'; + $request = $this->getPageRequest($list_id, $after, $before, $limit, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3823,40 +3843,65 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdMembershipsAddAndRemove' + * Create request for operation 'getPage' * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param \HubSpot\Client\Crm\Lists\Model\MembershipChangeRequest $membership_change_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAddAndRemove'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list. (required) + * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) + * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) + * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdMembershipsAddAndRemoveRequest($list_id, $membership_change_request, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAddAndRemove'][0]) + public function getPageRequest($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['getPage'][0]) { // verify the required parameter 'list_id' is set if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdMembershipsAddAndRemove' + 'Missing the required parameter $list_id when calling getPage' ); } - // verify the required parameter 'membership_change_request' is set - if ($membership_change_request === null || (is_array($membership_change_request) && count($membership_change_request) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $membership_change_request when calling crmV3ListsListIdMembershipsAddAndRemove' - ); - } - $resourcePath = '/crm/v3/lists/{listId}/memberships/add-and-remove'; + + + $resourcePath = '/crm/v3/lists/{listId}/memberships'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $before, + 'before', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -3876,14 +3921,7 @@ public function crmV3ListsListIdMembershipsAddAndRemoveRequest($list_id, $member ); // for model (json/xml) - if (isset($membership_change_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($membership_change_request), JSON_THROW_ON_ERROR); - } else { - $httpBody = $membership_change_request; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -3926,7 +3964,7 @@ public function crmV3ListsListIdMembershipsAddAndRemoveRequest($list_id, $member $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -3934,39 +3972,44 @@ public function crmV3ListsListIdMembershipsAddAndRemoveRequest($list_id, $member } /** - * Operation crmV3ListsListIdMembershipsAddFromSourceListId + * Operation getPageOrderedByAddedToListDate * - * Add All Records from a Source List to a Destination List + * Fetch List Memberships Ordered by Added to List Date * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. (required) - * @param string $source_list_id The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAddFromSourceListId'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list. (required) + * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) + * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) + * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPageOrderedByAddedToListDate'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return void + * @return \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListIdMembershipsAddFromSourceListId($list_id, $source_list_id, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAddFromSourceListId'][0]) + public function getPageOrderedByAddedToListDate($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['getPageOrderedByAddedToListDate'][0]) { - $this->crmV3ListsListIdMembershipsAddFromSourceListIdWithHttpInfo($list_id, $source_list_id, $contentType); + list($response) = $this->getPageOrderedByAddedToListDateWithHttpInfo($list_id, $after, $before, $limit, $contentType); + return $response; } /** - * Operation crmV3ListsListIdMembershipsAddFromSourceListIdWithHttpInfo + * Operation getPageOrderedByAddedToListDateWithHttpInfo * - * Add All Records from a Source List to a Destination List + * Fetch List Memberships Ordered by Added to List Date * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. (required) - * @param string $source_list_id The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAddFromSourceListId'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list. (required) + * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) + * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) + * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPageOrderedByAddedToListDate'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdMembershipsAddFromSourceListIdWithHttpInfo($list_id, $source_list_id, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAddFromSourceListId'][0]) + public function getPageOrderedByAddedToListDateWithHttpInfo($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['getPageOrderedByAddedToListDate'][0]) { - $request = $this->crmV3ListsListIdMembershipsAddFromSourceListIdRequest($list_id, $source_list_id, $contentType); + $request = $this->getPageOrderedByAddedToListDateRequest($list_id, $after, $before, $limit, $contentType); try { $options = $this->createHttpClientOption(); @@ -3991,9 +4034,51 @@ public function crmV3ListsListIdMembershipsAddFromSourceListIdWithHttpInfo($list $statusCode = $response->getStatusCode(); - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\Error', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -4010,20 +4095,22 @@ public function crmV3ListsListIdMembershipsAddFromSourceListIdWithHttpInfo($list } /** - * Operation crmV3ListsListIdMembershipsAddFromSourceListIdAsync + * Operation getPageOrderedByAddedToListDateAsync * - * Add All Records from a Source List to a Destination List + * Fetch List Memberships Ordered by Added to List Date * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. (required) - * @param string $source_list_id The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAddFromSourceListId'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list. (required) + * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) + * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) + * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPageOrderedByAddedToListDate'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsAddFromSourceListIdAsync($list_id, $source_list_id, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAddFromSourceListId'][0]) + public function getPageOrderedByAddedToListDateAsync($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['getPageOrderedByAddedToListDate'][0]) { - return $this->crmV3ListsListIdMembershipsAddFromSourceListIdAsyncWithHttpInfo($list_id, $source_list_id, $contentType) + return $this->getPageOrderedByAddedToListDateAsyncWithHttpInfo($list_id, $after, $before, $limit, $contentType) ->then( function ($response) { return $response[0]; @@ -4032,27 +4119,42 @@ function ($response) { } /** - * Operation crmV3ListsListIdMembershipsAddFromSourceListIdAsyncWithHttpInfo + * Operation getPageOrderedByAddedToListDateAsyncWithHttpInfo * - * Add All Records from a Source List to a Destination List + * Fetch List Memberships Ordered by Added to List Date * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. (required) - * @param string $source_list_id The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAddFromSourceListId'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list. (required) + * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) + * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) + * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPageOrderedByAddedToListDate'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsAddFromSourceListIdAsyncWithHttpInfo($list_id, $source_list_id, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAddFromSourceListId'][0]) + public function getPageOrderedByAddedToListDateAsyncWithHttpInfo($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['getPageOrderedByAddedToListDate'][0]) { - $returnType = ''; - $request = $this->crmV3ListsListIdMembershipsAddFromSourceListIdRequest($list_id, $source_list_id, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId'; + $request = $this->getPageOrderedByAddedToListDateRequest($list_id, $after, $before, $limit, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -4072,40 +4174,65 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdMembershipsAddFromSourceListId' + * Create request for operation 'getPageOrderedByAddedToListDate' * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` *destination list*, which the *source list* records are added to. (required) - * @param string $source_list_id The **ILS ID** of the *source list* to grab the records from, which are then added to the *destination list*. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsAddFromSourceListId'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list. (required) + * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) + * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) + * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPageOrderedByAddedToListDate'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdMembershipsAddFromSourceListIdRequest($list_id, $source_list_id, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsAddFromSourceListId'][0]) + public function getPageOrderedByAddedToListDateRequest($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['getPageOrderedByAddedToListDate'][0]) { // verify the required parameter 'list_id' is set if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdMembershipsAddFromSourceListId' + 'Missing the required parameter $list_id when calling getPageOrderedByAddedToListDate' ); } - // verify the required parameter 'source_list_id' is set - if ($source_list_id === null || (is_array($source_list_id) && count($source_list_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $source_list_id when calling crmV3ListsListIdMembershipsAddFromSourceListId' - ); - } - $resourcePath = '/crm/v3/lists/{listId}/memberships/add-from/{sourceListId}'; + + + $resourcePath = '/crm/v3/lists/{listId}/memberships/join-order'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $before, + 'before', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -4116,18 +4243,10 @@ public function crmV3ListsListIdMembershipsAddFromSourceListIdRequest($list_id, $resourcePath ); } - // path params - if ($source_list_id !== null) { - $resourcePath = str_replace( - '{' . 'sourceListId' . '}', - ObjectSerializer::toPathValue($source_list_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - ['*/*', ], + ['application/json', '*/*', ], $contentType, $multipart ); @@ -4176,7 +4295,7 @@ public function crmV3ListsListIdMembershipsAddFromSourceListIdRequest($list_id, $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -4184,44 +4303,38 @@ public function crmV3ListsListIdMembershipsAddFromSourceListIdRequest($list_id, } /** - * Operation crmV3ListsListIdMembershipsJoinOrder - * - * Fetch List Memberships Ordered by Added to List Date + * Operation getSizeAndEditsHistory * - * @param string $list_id The **ILS ID** of the list. (required) - * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) - * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) - * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsJoinOrder'] to see the possible values for this operation + * @param string $list_id (required) + * @param \DateTime|null $end_date (optional) + * @param \DateTime|null $start_date (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSizeAndEditsHistory'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListIdMembershipsJoinOrder($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsJoinOrder'][0]) + public function getSizeAndEditsHistory($list_id, $end_date = null, $start_date = null, string $contentType = self::contentTypes['getSizeAndEditsHistory'][0]) { - list($response) = $this->crmV3ListsListIdMembershipsJoinOrderWithHttpInfo($list_id, $after, $before, $limit, $contentType); + list($response) = $this->getSizeAndEditsHistoryWithHttpInfo($list_id, $end_date, $start_date, $contentType); return $response; } /** - * Operation crmV3ListsListIdMembershipsJoinOrderWithHttpInfo - * - * Fetch List Memberships Ordered by Added to List Date + * Operation getSizeAndEditsHistoryWithHttpInfo * - * @param string $list_id The **ILS ID** of the list. (required) - * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) - * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) - * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsJoinOrder'] to see the possible values for this operation + * @param string $list_id (required) + * @param \DateTime|null $end_date (optional) + * @param \DateTime|null $start_date (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSizeAndEditsHistory'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdMembershipsJoinOrderWithHttpInfo($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsJoinOrder'][0]) + public function getSizeAndEditsHistoryWithHttpInfo($list_id, $end_date = null, $start_date = null, string $contentType = self::contentTypes['getSizeAndEditsHistory'][0]) { - $request = $this->crmV3ListsListIdMembershipsJoinOrderRequest($list_id, $after, $before, $limit, $contentType); + $request = $this->getSizeAndEditsHistoryRequest($list_id, $end_date, $start_date, $contentType); try { $options = $this->createHttpClientOption(); @@ -4249,7 +4362,7 @@ public function crmV3ListsListIdMembershipsJoinOrderWithHttpInfo($list_id, $afte switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', + '\HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse', $request, $response, ); @@ -4277,7 +4390,7 @@ public function crmV3ListsListIdMembershipsJoinOrderWithHttpInfo($list_id, $afte } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', + '\HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse', $request, $response, ); @@ -4286,7 +4399,7 @@ public function crmV3ListsListIdMembershipsJoinOrderWithHttpInfo($list_id, $afte case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId', + '\HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4307,22 +4420,19 @@ public function crmV3ListsListIdMembershipsJoinOrderWithHttpInfo($list_id, $afte } /** - * Operation crmV3ListsListIdMembershipsJoinOrderAsync - * - * Fetch List Memberships Ordered by Added to List Date + * Operation getSizeAndEditsHistoryAsync * - * @param string $list_id The **ILS ID** of the list. (required) - * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) - * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) - * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsJoinOrder'] to see the possible values for this operation + * @param string $list_id (required) + * @param \DateTime|null $end_date (optional) + * @param \DateTime|null $start_date (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSizeAndEditsHistory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsJoinOrderAsync($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsJoinOrder'][0]) + public function getSizeAndEditsHistoryAsync($list_id, $end_date = null, $start_date = null, string $contentType = self::contentTypes['getSizeAndEditsHistory'][0]) { - return $this->crmV3ListsListIdMembershipsJoinOrderAsyncWithHttpInfo($list_id, $after, $before, $limit, $contentType) + return $this->getSizeAndEditsHistoryAsyncWithHttpInfo($list_id, $end_date, $start_date, $contentType) ->then( function ($response) { return $response[0]; @@ -4331,23 +4441,20 @@ function ($response) { } /** - * Operation crmV3ListsListIdMembershipsJoinOrderAsyncWithHttpInfo + * Operation getSizeAndEditsHistoryAsyncWithHttpInfo * - * Fetch List Memberships Ordered by Added to List Date - * - * @param string $list_id The **ILS ID** of the list. (required) - * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) - * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) - * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsJoinOrder'] to see the possible values for this operation + * @param string $list_id (required) + * @param \DateTime|null $end_date (optional) + * @param \DateTime|null $start_date (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSizeAndEditsHistory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsJoinOrderAsyncWithHttpInfo($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsJoinOrder'][0]) + public function getSizeAndEditsHistoryAsyncWithHttpInfo($list_id, $end_date = null, $start_date = null, string $contentType = self::contentTypes['getSizeAndEditsHistory'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseJoinTimeAndRecordId'; - $request = $this->crmV3ListsListIdMembershipsJoinOrderRequest($list_id, $after, $before, $limit, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse'; + $request = $this->getSizeAndEditsHistoryRequest($list_id, $end_date, $start_date, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4386,32 +4493,30 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdMembershipsJoinOrder' + * Create request for operation 'getSizeAndEditsHistory' * - * @param string $list_id The **ILS ID** of the list. (required) - * @param string|null $after The paging offset token for the page that comes `after` the previously requested records. If provided, then the records in the response will be the records following the offset, sorted in *ascending* order. Takes precedence over the `before` offset. (optional) - * @param string|null $before The paging offset token for the page that comes `before` the previously requested records. If provided, then the records in the response will be the records preceding the offset, sorted in *descending* order. (optional) - * @param int|null $limit The number of records to return in the response. The maximum `limit` is 250. (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsJoinOrder'] to see the possible values for this operation + * @param string $list_id (required) + * @param \DateTime|null $end_date (optional) + * @param \DateTime|null $start_date (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSizeAndEditsHistory'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdMembershipsJoinOrderRequest($list_id, $after = null, $before = null, $limit = 100, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsJoinOrder'][0]) + public function getSizeAndEditsHistoryRequest($list_id, $end_date = null, $start_date = null, string $contentType = self::contentTypes['getSizeAndEditsHistory'][0]) { // verify the required parameter 'list_id' is set if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdMembershipsJoinOrder' + 'Missing the required parameter $list_id when calling getSizeAndEditsHistory' ); } - - $resourcePath = '/crm/v3/lists/{listId}/memberships/join-order'; + $resourcePath = '/crm/v3/lists/{listId}/size-and-edits-history/between'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4420,8 +4525,8 @@ public function crmV3ListsListIdMembershipsJoinOrderRequest($list_id, $after = n // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $end_date, + 'endDate', // param base name 'string', // openApiType 'form', // style true, // explode @@ -4429,22 +4534,13 @@ public function crmV3ListsListIdMembershipsJoinOrderRequest($list_id, $after = n ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $before, - 'before', // param base name + $start_date, + 'startDate', // param base name 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -4515,40 +4611,40 @@ public function crmV3ListsListIdMembershipsJoinOrderRequest($list_id, $after = n } /** - * Operation crmV3ListsListIdMembershipsRemove + * Operation move * - * Remove Records from a List + * Moves a folder * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string[] $request_body request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsRemove'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to move (required) + * @param string $new_parent_folder_id The ID for the target parent folder. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['move'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListIdMembershipsRemove($list_id, $request_body, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsRemove'][0]) + public function move($folder_id, $new_parent_folder_id, string $contentType = self::contentTypes['move'][0]) { - list($response) = $this->crmV3ListsListIdMembershipsRemoveWithHttpInfo($list_id, $request_body, $contentType); + list($response) = $this->moveWithHttpInfo($folder_id, $new_parent_folder_id, $contentType); return $response; } /** - * Operation crmV3ListsListIdMembershipsRemoveWithHttpInfo + * Operation moveWithHttpInfo * - * Remove Records from a List + * Moves a folder * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsRemove'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to move (required) + * @param string $new_parent_folder_id The ID for the target parent folder. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['move'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdMembershipsRemoveWithHttpInfo($list_id, $request_body, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsRemove'][0]) + public function moveWithHttpInfo($folder_id, $new_parent_folder_id, string $contentType = self::contentTypes['move'][0]) { - $request = $this->crmV3ListsListIdMembershipsRemoveRequest($list_id, $request_body, $contentType); + $request = $this->moveRequest($folder_id, $new_parent_folder_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -4576,7 +4672,7 @@ public function crmV3ListsListIdMembershipsRemoveWithHttpInfo($list_id, $request switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', $request, $response, ); @@ -4604,7 +4700,7 @@ public function crmV3ListsListIdMembershipsRemoveWithHttpInfo($list_id, $request } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', $request, $response, ); @@ -4613,7 +4709,7 @@ public function crmV3ListsListIdMembershipsRemoveWithHttpInfo($list_id, $request case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -4634,20 +4730,20 @@ public function crmV3ListsListIdMembershipsRemoveWithHttpInfo($list_id, $request } /** - * Operation crmV3ListsListIdMembershipsRemoveAsync + * Operation moveAsync * - * Remove Records from a List + * Moves a folder * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsRemove'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to move (required) + * @param string $new_parent_folder_id The ID for the target parent folder. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['move'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsRemoveAsync($list_id, $request_body, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsRemove'][0]) + public function moveAsync($folder_id, $new_parent_folder_id, string $contentType = self::contentTypes['move'][0]) { - return $this->crmV3ListsListIdMembershipsRemoveAsyncWithHttpInfo($list_id, $request_body, $contentType) + return $this->moveAsyncWithHttpInfo($folder_id, $new_parent_folder_id, $contentType) ->then( function ($response) { return $response[0]; @@ -4656,21 +4752,21 @@ function ($response) { } /** - * Operation crmV3ListsListIdMembershipsRemoveAsyncWithHttpInfo + * Operation moveAsyncWithHttpInfo * - * Remove Records from a List + * Moves a folder * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsRemove'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to move (required) + * @param string $new_parent_folder_id The ID for the target parent folder. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['move'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMembershipsRemoveAsyncWithHttpInfo($list_id, $request_body, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsRemove'][0]) + public function moveAsyncWithHttpInfo($folder_id, $new_parent_folder_id, string $contentType = self::contentTypes['move'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse'; - $request = $this->crmV3ListsListIdMembershipsRemoveRequest($list_id, $request_body, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse'; + $request = $this->moveRequest($folder_id, $new_parent_folder_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4709,34 +4805,34 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdMembershipsRemove' + * Create request for operation 'move' * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string[] $request_body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMembershipsRemove'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to move (required) + * @param string $new_parent_folder_id The ID for the target parent folder. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['move'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdMembershipsRemoveRequest($list_id, $request_body, string $contentType = self::contentTypes['crmV3ListsListIdMembershipsRemove'][0]) + public function moveRequest($folder_id, $new_parent_folder_id, string $contentType = self::contentTypes['move'][0]) { - // verify the required parameter 'list_id' is set - if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdMembershipsRemove' + 'Missing the required parameter $folder_id when calling move' ); } - // verify the required parameter 'request_body' is set - if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { + // verify the required parameter 'new_parent_folder_id' is set + if ($new_parent_folder_id === null || (is_array($new_parent_folder_id) && count($new_parent_folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $request_body when calling crmV3ListsListIdMembershipsRemove' + 'Missing the required parameter $new_parent_folder_id when calling move' ); } - $resourcePath = '/crm/v3/lists/{listId}/memberships/remove'; + $resourcePath = '/crm/v3/lists/folders/{folderId}/move/{newParentFolderId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4746,10 +4842,18 @@ public function crmV3ListsListIdMembershipsRemoveRequest($list_id, $request_body // path params - if ($list_id !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( - '{' . 'listId' . '}', - ObjectSerializer::toPathValue($list_id), + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folder_id), + $resourcePath + ); + } + // path params + if ($new_parent_folder_id !== null) { + $resourcePath = str_replace( + '{' . 'newParentFolderId' . '}', + ObjectSerializer::toPathValue($new_parent_folder_id), $resourcePath ); } @@ -4762,14 +4866,7 @@ public function crmV3ListsListIdMembershipsRemoveRequest($list_id, $request_body ); // for model (json/xml) - if (isset($request_body)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($request_body), JSON_THROW_ON_ERROR); - } else { - $httpBody = $request_body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -4820,37 +4917,37 @@ public function crmV3ListsListIdMembershipsRemoveRequest($list_id, $request_body } /** - * Operation crmV3ListsListIdMemberships_0 + * Operation moveList * - * Delete All Records from a List + * Moves a list to a given folder * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMemberships_0'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListMoveRequest $list_move_request list_move_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['moveList'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function crmV3ListsListIdMemberships_0($list_id, string $contentType = self::contentTypes['crmV3ListsListIdMemberships_0'][0]) + public function moveList($list_move_request, string $contentType = self::contentTypes['moveList'][0]) { - $this->crmV3ListsListIdMemberships_0WithHttpInfo($list_id, $contentType); + $this->moveListWithHttpInfo($list_move_request, $contentType); } /** - * Operation crmV3ListsListIdMemberships_0WithHttpInfo + * Operation moveListWithHttpInfo * - * Delete All Records from a List + * Moves a list to a given folder * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMemberships_0'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListMoveRequest $list_move_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['moveList'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdMemberships_0WithHttpInfo($list_id, string $contentType = self::contentTypes['crmV3ListsListIdMemberships_0'][0]) + public function moveListWithHttpInfo($list_move_request, string $contentType = self::contentTypes['moveList'][0]) { - $request = $this->crmV3ListsListIdMemberships_0Request($list_id, $contentType); + $request = $this->moveListRequest($list_move_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -4894,19 +4991,19 @@ public function crmV3ListsListIdMemberships_0WithHttpInfo($list_id, string $cont } /** - * Operation crmV3ListsListIdMemberships_0Async + * Operation moveListAsync * - * Delete All Records from a List + * Moves a list to a given folder * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMemberships_0'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListMoveRequest $list_move_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['moveList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMemberships_0Async($list_id, string $contentType = self::contentTypes['crmV3ListsListIdMemberships_0'][0]) + public function moveListAsync($list_move_request, string $contentType = self::contentTypes['moveList'][0]) { - return $this->crmV3ListsListIdMemberships_0AsyncWithHttpInfo($list_id, $contentType) + return $this->moveListAsyncWithHttpInfo($list_move_request, $contentType) ->then( function ($response) { return $response[0]; @@ -4915,20 +5012,20 @@ function ($response) { } /** - * Operation crmV3ListsListIdMemberships_0AsyncWithHttpInfo + * Operation moveListAsyncWithHttpInfo * - * Delete All Records from a List + * Moves a list to a given folder * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMemberships_0'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListMoveRequest $list_move_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['moveList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdMemberships_0AsyncWithHttpInfo($list_id, string $contentType = self::contentTypes['crmV3ListsListIdMemberships_0'][0]) + public function moveListAsyncWithHttpInfo($list_move_request, string $contentType = self::contentTypes['moveList'][0]) { $returnType = ''; - $request = $this->crmV3ListsListIdMemberships_0Request($list_id, $contentType); + $request = $this->moveListRequest($list_move_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4954,26 +5051,26 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdMemberships_0' + * Create request for operation 'moveList' * - * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdMemberships_0'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Lists\Model\ListMoveRequest $list_move_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['moveList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdMemberships_0Request($list_id, string $contentType = self::contentTypes['crmV3ListsListIdMemberships_0'][0]) + public function moveListRequest($list_move_request, string $contentType = self::contentTypes['moveList'][0]) { - - // verify the required parameter 'list_id' is set - if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { + + // verify the required parameter 'list_move_request' is set + if ($list_move_request === null || (is_array($list_move_request) && count($list_move_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdMemberships_0' + 'Missing the required parameter $list_move_request when calling moveList' ); } - $resourcePath = '/crm/v3/lists/{listId}/memberships'; + $resourcePath = '/crm/v3/lists/folders/move-list'; $formParams = []; $queryParams = []; $headerParams = []; @@ -4982,14 +5079,6 @@ public function crmV3ListsListIdMemberships_0Request($list_id, string $contentTy - // path params - if ($list_id !== null) { - $resourcePath = str_replace( - '{' . 'listId' . '}', - ObjectSerializer::toPathValue($list_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -4999,7 +5088,14 @@ public function crmV3ListsListIdMemberships_0Request($list_id, string $contentTy ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($list_move_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($list_move_request), JSON_THROW_ON_ERROR); + } else { + $httpBody = $list_move_request; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -5042,7 +5138,7 @@ public function crmV3ListsListIdMemberships_0Request($list_id, string $contentTy $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -5050,37 +5146,37 @@ public function crmV3ListsListIdMemberships_0Request($list_id, string $contentTy } /** - * Operation crmV3ListsListIdRestore + * Operation remove * - * Restore a List + * Delete a List * - * @param string $list_id The **ILS ID** of the list to restore. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdRestore'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['remove'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function crmV3ListsListIdRestore($list_id, string $contentType = self::contentTypes['crmV3ListsListIdRestore'][0]) + public function remove($list_id, string $contentType = self::contentTypes['remove'][0]) { - $this->crmV3ListsListIdRestoreWithHttpInfo($list_id, $contentType); + $this->removeWithHttpInfo($list_id, $contentType); } /** - * Operation crmV3ListsListIdRestoreWithHttpInfo + * Operation removeWithHttpInfo * - * Restore a List + * Delete a List * - * @param string $list_id The **ILS ID** of the list to restore. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdRestore'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['remove'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdRestoreWithHttpInfo($list_id, string $contentType = self::contentTypes['crmV3ListsListIdRestore'][0]) + public function removeWithHttpInfo($list_id, string $contentType = self::contentTypes['remove'][0]) { - $request = $this->crmV3ListsListIdRestoreRequest($list_id, $contentType); + $request = $this->removeRequest($list_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -5124,19 +5220,19 @@ public function crmV3ListsListIdRestoreWithHttpInfo($list_id, string $contentTyp } /** - * Operation crmV3ListsListIdRestoreAsync + * Operation removeAsync * - * Restore a List + * Delete a List * - * @param string $list_id The **ILS ID** of the list to restore. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdRestore'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['remove'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdRestoreAsync($list_id, string $contentType = self::contentTypes['crmV3ListsListIdRestore'][0]) + public function removeAsync($list_id, string $contentType = self::contentTypes['remove'][0]) { - return $this->crmV3ListsListIdRestoreAsyncWithHttpInfo($list_id, $contentType) + return $this->removeAsyncWithHttpInfo($list_id, $contentType) ->then( function ($response) { return $response[0]; @@ -5145,20 +5241,20 @@ function ($response) { } /** - * Operation crmV3ListsListIdRestoreAsyncWithHttpInfo + * Operation removeAsyncWithHttpInfo * - * Restore a List + * Delete a List * - * @param string $list_id The **ILS ID** of the list to restore. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdRestore'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['remove'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdRestoreAsyncWithHttpInfo($list_id, string $contentType = self::contentTypes['crmV3ListsListIdRestore'][0]) + public function removeAsyncWithHttpInfo($list_id, string $contentType = self::contentTypes['remove'][0]) { $returnType = ''; - $request = $this->crmV3ListsListIdRestoreRequest($list_id, $contentType); + $request = $this->removeRequest($list_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -5184,26 +5280,26 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdRestore' + * Create request for operation 'remove' * - * @param string $list_id The **ILS ID** of the list to restore. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdRestore'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to delete. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['remove'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdRestoreRequest($list_id, string $contentType = self::contentTypes['crmV3ListsListIdRestore'][0]) + public function removeRequest($list_id, string $contentType = self::contentTypes['remove'][0]) { // verify the required parameter 'list_id' is set if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdRestore' + 'Missing the required parameter $list_id when calling remove' ); } - $resourcePath = '/crm/v3/lists/{listId}/restore'; + $resourcePath = '/crm/v3/lists/{listId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -5272,7 +5368,7 @@ public function crmV3ListsListIdRestoreRequest($list_id, string $contentType = s $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -5280,38 +5376,37 @@ public function crmV3ListsListIdRestoreRequest($list_id, string $contentType = s } /** - * Operation crmV3ListsListIdScheduleConversion + * Operation removeAll * - * Retrieve the conversion details for a list + * Delete All Records from a List * - * @param string $list_id The ID of the list to schedule the conversion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAll'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return void */ - public function crmV3ListsListIdScheduleConversion($list_id, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion'][0]) + public function removeAll($list_id, string $contentType = self::contentTypes['removeAll'][0]) { - list($response) = $this->crmV3ListsListIdScheduleConversionWithHttpInfo($list_id, $contentType); - return $response; + $this->removeAllWithHttpInfo($list_id, $contentType); } /** - * Operation crmV3ListsListIdScheduleConversionWithHttpInfo + * Operation removeAllWithHttpInfo * - * Retrieve the conversion details for a list + * Delete All Records from a List * - * @param string $list_id The ID of the list to schedule the conversion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAll'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdScheduleConversionWithHttpInfo($list_id, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion'][0]) + public function removeAllWithHttpInfo($list_id, string $contentType = self::contentTypes['removeAll'][0]) { - $request = $this->crmV3ListsListIdScheduleConversionRequest($list_id, $contentType); + $request = $this->removeAllRequest($list_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -5336,51 +5431,9 @@ public function crmV3ListsListIdScheduleConversionWithHttpInfo($list_id, string $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', - $request, - $response, - ); - default: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\Error', - $request, - $response, - ); - } - - - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', - $request, - $response, - ); + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5397,19 +5450,19 @@ public function crmV3ListsListIdScheduleConversionWithHttpInfo($list_id, string } /** - * Operation crmV3ListsListIdScheduleConversionAsync + * Operation removeAllAsync * - * Retrieve the conversion details for a list + * Delete All Records from a List * - * @param string $list_id The ID of the list to schedule the conversion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAll'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdScheduleConversionAsync($list_id, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion'][0]) + public function removeAllAsync($list_id, string $contentType = self::contentTypes['removeAll'][0]) { - return $this->crmV3ListsListIdScheduleConversionAsyncWithHttpInfo($list_id, $contentType) + return $this->removeAllAsyncWithHttpInfo($list_id, $contentType) ->then( function ($response) { return $response[0]; @@ -5418,39 +5471,26 @@ function ($response) { } /** - * Operation crmV3ListsListIdScheduleConversionAsyncWithHttpInfo + * Operation removeAllAsyncWithHttpInfo * - * Retrieve the conversion details for a list + * Delete All Records from a List * - * @param string $list_id The ID of the list to schedule the conversion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAll'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdScheduleConversionAsyncWithHttpInfo($list_id, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion'][0]) + public function removeAllAsyncWithHttpInfo($list_id, string $contentType = self::contentTypes['removeAll'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse'; - $request = $this->crmV3ListsListIdScheduleConversionRequest($list_id, $contentType); + $returnType = ''; + $request = $this->removeAllRequest($list_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -5470,26 +5510,26 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdScheduleConversion' + * Create request for operation 'removeAll' * - * @param string $list_id The ID of the list to schedule the conversion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeAll'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdScheduleConversionRequest($list_id, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion'][0]) + public function removeAllRequest($list_id, string $contentType = self::contentTypes['removeAll'][0]) { // verify the required parameter 'list_id' is set if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdScheduleConversion' + 'Missing the required parameter $list_id when calling removeAll' ); } - $resourcePath = '/crm/v3/lists/{listId}/schedule-conversion'; + $resourcePath = '/crm/v3/lists/{listId}/memberships'; $formParams = []; $queryParams = []; $headerParams = []; @@ -5509,7 +5549,7 @@ public function crmV3ListsListIdScheduleConversionRequest($list_id, string $cont $headers = $this->headerSelector->selectHeaders( - ['application/json', '*/*', ], + ['*/*', ], $contentType, $multipart ); @@ -5558,7 +5598,7 @@ public function crmV3ListsListIdScheduleConversionRequest($list_id, string $cont $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -5566,40 +5606,37 @@ public function crmV3ListsListIdScheduleConversionRequest($list_id, string $cont } /** - * Operation crmV3ListsListIdScheduleConversion_0 + * Operation removeFolder * - * Schedule or update the conversion of a list to static + * Deletes a folder * - * @param string $list_id The ID of the list to schedule the conversion for. (required) - * @param \HubSpot\Client\Crm\Lists\Model\PublicListConversionTime $public_list_conversion_time public_list_conversion_time (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion_0'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to delete (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeFolder'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return void */ - public function crmV3ListsListIdScheduleConversion_0($list_id, $public_list_conversion_time, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion_0'][0]) + public function removeFolder($folder_id, string $contentType = self::contentTypes['removeFolder'][0]) { - list($response) = $this->crmV3ListsListIdScheduleConversion_0WithHttpInfo($list_id, $public_list_conversion_time, $contentType); - return $response; + $this->removeFolderWithHttpInfo($folder_id, $contentType); } /** - * Operation crmV3ListsListIdScheduleConversion_0WithHttpInfo + * Operation removeFolderWithHttpInfo * - * Schedule or update the conversion of a list to static + * Deletes a folder * - * @param string $list_id The ID of the list to schedule the conversion for. (required) - * @param \HubSpot\Client\Crm\Lists\Model\PublicListConversionTime $public_list_conversion_time (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion_0'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to delete (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeFolder'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdScheduleConversion_0WithHttpInfo($list_id, $public_list_conversion_time, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion_0'][0]) + public function removeFolderWithHttpInfo($folder_id, string $contentType = self::contentTypes['removeFolder'][0]) { - $request = $this->crmV3ListsListIdScheduleConversion_0Request($list_id, $public_list_conversion_time, $contentType); + $request = $this->removeFolderRequest($folder_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -5624,51 +5661,9 @@ public function crmV3ListsListIdScheduleConversion_0WithHttpInfo($list_id, $publ $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', - $request, - $response, - ); - default: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\Error', - $request, - $response, - ); - } - - - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', - $request, - $response, - ); + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5685,20 +5680,19 @@ public function crmV3ListsListIdScheduleConversion_0WithHttpInfo($list_id, $publ } /** - * Operation crmV3ListsListIdScheduleConversion_0Async + * Operation removeFolderAsync * - * Schedule or update the conversion of a list to static + * Deletes a folder * - * @param string $list_id The ID of the list to schedule the conversion for. (required) - * @param \HubSpot\Client\Crm\Lists\Model\PublicListConversionTime $public_list_conversion_time (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion_0'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to delete (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdScheduleConversion_0Async($list_id, $public_list_conversion_time, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion_0'][0]) + public function removeFolderAsync($folder_id, string $contentType = self::contentTypes['removeFolder'][0]) { - return $this->crmV3ListsListIdScheduleConversion_0AsyncWithHttpInfo($list_id, $public_list_conversion_time, $contentType) + return $this->removeFolderAsyncWithHttpInfo($folder_id, $contentType) ->then( function ($response) { return $response[0]; @@ -5707,40 +5701,26 @@ function ($response) { } /** - * Operation crmV3ListsListIdScheduleConversion_0AsyncWithHttpInfo + * Operation removeFolderAsyncWithHttpInfo * - * Schedule or update the conversion of a list to static + * Deletes a folder * - * @param string $list_id The ID of the list to schedule the conversion for. (required) - * @param \HubSpot\Client\Crm\Lists\Model\PublicListConversionTime $public_list_conversion_time (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion_0'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to delete (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdScheduleConversion_0AsyncWithHttpInfo($list_id, $public_list_conversion_time, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion_0'][0]) + public function removeFolderAsyncWithHttpInfo($folder_id, string $contentType = self::contentTypes['removeFolder'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse'; - $request = $this->crmV3ListsListIdScheduleConversion_0Request($list_id, $public_list_conversion_time, $contentType); + $returnType = ''; + $request = $this->removeFolderRequest($folder_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -5760,34 +5740,26 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdScheduleConversion_0' + * Create request for operation 'removeFolder' * - * @param string $list_id The ID of the list to schedule the conversion for. (required) - * @param \HubSpot\Client\Crm\Lists\Model\PublicListConversionTime $public_list_conversion_time (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion_0'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to delete (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeFolder'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdScheduleConversion_0Request($list_id, $public_list_conversion_time, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion_0'][0]) + public function removeFolderRequest($folder_id, string $contentType = self::contentTypes['removeFolder'][0]) { - // verify the required parameter 'list_id' is set - if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdScheduleConversion_0' - ); - } - - // verify the required parameter 'public_list_conversion_time' is set - if ($public_list_conversion_time === null || (is_array($public_list_conversion_time) && count($public_list_conversion_time) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $public_list_conversion_time when calling crmV3ListsListIdScheduleConversion_0' + 'Missing the required parameter $folder_id when calling removeFolder' ); } - $resourcePath = '/crm/v3/lists/{listId}/schedule-conversion'; + $resourcePath = '/crm/v3/lists/folders/{folderId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -5797,30 +5769,23 @@ public function crmV3ListsListIdScheduleConversion_0Request($list_id, $public_li // path params - if ($list_id !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( - '{' . 'listId' . '}', - ObjectSerializer::toPathValue($list_id), + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } $headers = $this->headerSelector->selectHeaders( - ['application/json', '*/*', ], + ['*/*', ], $contentType, $multipart - ); - - // for model (json/xml) - if (isset($public_list_conversion_time)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($public_list_conversion_time), JSON_THROW_ON_ERROR); - } else { - $httpBody = $public_list_conversion_time; - } - } elseif (count($formParams) > 0) { + ); + + // for model (json/xml) + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -5863,7 +5828,7 @@ public function crmV3ListsListIdScheduleConversion_0Request($list_id, $public_li $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'PUT', + 'DELETE', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -5871,37 +5836,40 @@ public function crmV3ListsListIdScheduleConversion_0Request($list_id, $public_li } /** - * Operation crmV3ListsListIdScheduleConversion_1 + * Operation removeMembers * - * Cancel the conversion of a list + * Remove Records from a List * - * @param string $list_id The ID of the list that you want to cancel the conversion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion_1'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string[] $request_body request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeMembers'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return void + * @return \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListIdScheduleConversion_1($list_id, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion_1'][0]) + public function removeMembers($list_id, $request_body, string $contentType = self::contentTypes['removeMembers'][0]) { - $this->crmV3ListsListIdScheduleConversion_1WithHttpInfo($list_id, $contentType); + list($response) = $this->removeMembersWithHttpInfo($list_id, $request_body, $contentType); + return $response; } /** - * Operation crmV3ListsListIdScheduleConversion_1WithHttpInfo + * Operation removeMembersWithHttpInfo * - * Cancel the conversion of a list + * Remove Records from a List * - * @param string $list_id The ID of the list that you want to cancel the conversion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion_1'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeMembers'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdScheduleConversion_1WithHttpInfo($list_id, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion_1'][0]) + public function removeMembersWithHttpInfo($list_id, $request_body, string $contentType = self::contentTypes['removeMembers'][0]) { - $request = $this->crmV3ListsListIdScheduleConversion_1Request($list_id, $contentType); + $request = $this->removeMembersRequest($list_id, $request_body, $contentType); try { $options = $this->createHttpClientOption(); @@ -5926,9 +5894,51 @@ public function crmV3ListsListIdScheduleConversion_1WithHttpInfo($list_id, strin $statusCode = $response->getStatusCode(); - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\Error', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -5945,19 +5955,20 @@ public function crmV3ListsListIdScheduleConversion_1WithHttpInfo($list_id, strin } /** - * Operation crmV3ListsListIdScheduleConversion_1Async + * Operation removeMembersAsync * - * Cancel the conversion of a list + * Remove Records from a List * - * @param string $list_id The ID of the list that you want to cancel the conversion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion_1'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeMembers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdScheduleConversion_1Async($list_id, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion_1'][0]) + public function removeMembersAsync($list_id, $request_body, string $contentType = self::contentTypes['removeMembers'][0]) { - return $this->crmV3ListsListIdScheduleConversion_1AsyncWithHttpInfo($list_id, $contentType) + return $this->removeMembersAsyncWithHttpInfo($list_id, $request_body, $contentType) ->then( function ($response) { return $response[0]; @@ -5966,26 +5977,40 @@ function ($response) { } /** - * Operation crmV3ListsListIdScheduleConversion_1AsyncWithHttpInfo + * Operation removeMembersAsyncWithHttpInfo * - * Cancel the conversion of a list + * Remove Records from a List * - * @param string $list_id The ID of the list that you want to cancel the conversion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion_1'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeMembers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdScheduleConversion_1AsyncWithHttpInfo($list_id, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion_1'][0]) + public function removeMembersAsyncWithHttpInfo($list_id, $request_body, string $contentType = self::contentTypes['removeMembers'][0]) { - $returnType = ''; - $request = $this->crmV3ListsListIdScheduleConversion_1Request($list_id, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\MembershipsUpdateResponse'; + $request = $this->removeMembersRequest($list_id, $request_body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -6005,26 +6030,34 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdScheduleConversion_1' + * Create request for operation 'removeMembers' * - * @param string $list_id The ID of the list that you want to cancel the conversion for. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdScheduleConversion_1'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the `MANUAL` or `SNAPSHOT` list. (required) + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['removeMembers'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdScheduleConversion_1Request($list_id, string $contentType = self::contentTypes['crmV3ListsListIdScheduleConversion_1'][0]) + public function removeMembersRequest($list_id, $request_body, string $contentType = self::contentTypes['removeMembers'][0]) { // verify the required parameter 'list_id' is set if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdScheduleConversion_1' + 'Missing the required parameter $list_id when calling removeMembers' + ); + } + + // verify the required parameter 'request_body' is set + if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $request_body when calling removeMembers' ); } - $resourcePath = '/crm/v3/lists/{listId}/schedule-conversion'; + $resourcePath = '/crm/v3/lists/{listId}/memberships/remove'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6044,13 +6077,20 @@ public function crmV3ListsListIdScheduleConversion_1Request($list_id, string $co $headers = $this->headerSelector->selectHeaders( - ['*/*', ], + ['application/json', '*/*', ], $contentType, $multipart ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($request_body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($request_body), JSON_THROW_ON_ERROR); + } else { + $httpBody = $request_body; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -6093,7 +6133,7 @@ public function crmV3ListsListIdScheduleConversion_1Request($list_id, string $co $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -6101,38 +6141,40 @@ public function crmV3ListsListIdScheduleConversion_1Request($list_id, string $co } /** - * Operation crmV3ListsListIdSizeAndEditsHistoryBetween + * Operation rename * - * @param string $list_id (required) - * @param \DateTime|null $end_date (optional) - * @param \DateTime|null $start_date (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdSizeAndEditsHistoryBetween'] to see the possible values for this operation + * Rename a folder + * + * @param string $folder_id The ID of the folder to rename (required) + * @param string|null $new_folder_name The new name of the folder. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rename'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListIdSizeAndEditsHistoryBetween($list_id, $end_date = null, $start_date = null, string $contentType = self::contentTypes['crmV3ListsListIdSizeAndEditsHistoryBetween'][0]) + public function rename($folder_id, $new_folder_name = null, string $contentType = self::contentTypes['rename'][0]) { - list($response) = $this->crmV3ListsListIdSizeAndEditsHistoryBetweenWithHttpInfo($list_id, $end_date, $start_date, $contentType); + list($response) = $this->renameWithHttpInfo($folder_id, $new_folder_name, $contentType); return $response; } /** - * Operation crmV3ListsListIdSizeAndEditsHistoryBetweenWithHttpInfo + * Operation renameWithHttpInfo * - * @param string $list_id (required) - * @param \DateTime|null $end_date (optional) - * @param \DateTime|null $start_date (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdSizeAndEditsHistoryBetween'] to see the possible values for this operation + * Rename a folder + * + * @param string $folder_id The ID of the folder to rename (required) + * @param string|null $new_folder_name The new name of the folder. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rename'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdSizeAndEditsHistoryBetweenWithHttpInfo($list_id, $end_date = null, $start_date = null, string $contentType = self::contentTypes['crmV3ListsListIdSizeAndEditsHistoryBetween'][0]) + public function renameWithHttpInfo($folder_id, $new_folder_name = null, string $contentType = self::contentTypes['rename'][0]) { - $request = $this->crmV3ListsListIdSizeAndEditsHistoryBetweenRequest($list_id, $end_date, $start_date, $contentType); + $request = $this->renameRequest($folder_id, $new_folder_name, $contentType); try { $options = $this->createHttpClientOption(); @@ -6160,7 +6202,7 @@ public function crmV3ListsListIdSizeAndEditsHistoryBetweenWithHttpInfo($list_id, switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse', + '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', $request, $response, ); @@ -6188,7 +6230,7 @@ public function crmV3ListsListIdSizeAndEditsHistoryBetweenWithHttpInfo($list_id, } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse', + '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', $request, $response, ); @@ -6197,7 +6239,7 @@ public function crmV3ListsListIdSizeAndEditsHistoryBetweenWithHttpInfo($list_id, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse', + '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6218,19 +6260,20 @@ public function crmV3ListsListIdSizeAndEditsHistoryBetweenWithHttpInfo($list_id, } /** - * Operation crmV3ListsListIdSizeAndEditsHistoryBetweenAsync + * Operation renameAsync * - * @param string $list_id (required) - * @param \DateTime|null $end_date (optional) - * @param \DateTime|null $start_date (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdSizeAndEditsHistoryBetween'] to see the possible values for this operation + * Rename a folder + * + * @param string $folder_id The ID of the folder to rename (required) + * @param string|null $new_folder_name The new name of the folder. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rename'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdSizeAndEditsHistoryBetweenAsync($list_id, $end_date = null, $start_date = null, string $contentType = self::contentTypes['crmV3ListsListIdSizeAndEditsHistoryBetween'][0]) + public function renameAsync($folder_id, $new_folder_name = null, string $contentType = self::contentTypes['rename'][0]) { - return $this->crmV3ListsListIdSizeAndEditsHistoryBetweenAsyncWithHttpInfo($list_id, $end_date, $start_date, $contentType) + return $this->renameAsyncWithHttpInfo($folder_id, $new_folder_name, $contentType) ->then( function ($response) { return $response[0]; @@ -6239,20 +6282,21 @@ function ($response) { } /** - * Operation crmV3ListsListIdSizeAndEditsHistoryBetweenAsyncWithHttpInfo + * Operation renameAsyncWithHttpInfo * - * @param string $list_id (required) - * @param \DateTime|null $end_date (optional) - * @param \DateTime|null $start_date (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdSizeAndEditsHistoryBetween'] to see the possible values for this operation + * Rename a folder + * + * @param string $folder_id The ID of the folder to rename (required) + * @param string|null $new_folder_name The new name of the folder. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rename'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdSizeAndEditsHistoryBetweenAsyncWithHttpInfo($list_id, $end_date = null, $start_date = null, string $contentType = self::contentTypes['crmV3ListsListIdSizeAndEditsHistoryBetween'][0]) + public function renameAsyncWithHttpInfo($folder_id, $new_folder_name = null, string $contentType = self::contentTypes['rename'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ListSizeAndEditHistoryResponse'; - $request = $this->crmV3ListsListIdSizeAndEditsHistoryBetweenRequest($list_id, $end_date, $start_date, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFolderFetchResponse'; + $request = $this->renameRequest($folder_id, $new_folder_name, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6291,30 +6335,28 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdSizeAndEditsHistoryBetween' + * Create request for operation 'rename' * - * @param string $list_id (required) - * @param \DateTime|null $end_date (optional) - * @param \DateTime|null $start_date (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdSizeAndEditsHistoryBetween'] to see the possible values for this operation + * @param string $folder_id The ID of the folder to rename (required) + * @param string|null $new_folder_name The new name of the folder. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['rename'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdSizeAndEditsHistoryBetweenRequest($list_id, $end_date = null, $start_date = null, string $contentType = self::contentTypes['crmV3ListsListIdSizeAndEditsHistoryBetween'][0]) + public function renameRequest($folder_id, $new_folder_name = null, string $contentType = self::contentTypes['rename'][0]) { - // verify the required parameter 'list_id' is set - if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { + // verify the required parameter 'folder_id' is set + if ($folder_id === null || (is_array($folder_id) && count($folder_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdSizeAndEditsHistoryBetween' + 'Missing the required parameter $folder_id when calling rename' ); } - - $resourcePath = '/crm/v3/lists/{listId}/size-and-edits-history/between'; + $resourcePath = '/crm/v3/lists/folders/{folderId}/rename'; $formParams = []; $queryParams = []; $headerParams = []; @@ -6323,17 +6365,8 @@ public function crmV3ListsListIdSizeAndEditsHistoryBetweenRequest($list_id, $end // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $end_date, - 'endDate', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $start_date, - 'startDate', // param base name + $new_folder_name, + 'newFolderName', // param base name 'string', // openApiType 'form', // style true, // explode @@ -6342,10 +6375,10 @@ public function crmV3ListsListIdSizeAndEditsHistoryBetweenRequest($list_id, $end // path params - if ($list_id !== null) { + if ($folder_id !== null) { $resourcePath = str_replace( - '{' . 'listId' . '}', - ObjectSerializer::toPathValue($list_id), + '{' . 'folderId' . '}', + ObjectSerializer::toPathValue($folder_id), $resourcePath ); } @@ -6401,7 +6434,7 @@ public function crmV3ListsListIdSizeAndEditsHistoryBetweenRequest($list_id, $end $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -6409,42 +6442,37 @@ public function crmV3ListsListIdSizeAndEditsHistoryBetweenRequest($list_id, $end } /** - * Operation crmV3ListsListIdUpdateListFilters + * Operation restore * - * Update List Filter Definition + * Restore a List * - * @param string $list_id The **ILS ID** of the list to update. (required) - * @param \HubSpot\Client\Crm\Lists\Model\ListFilterUpdateRequest $list_filter_update_request list_filter_update_request (required) - * @param bool|null $enroll_objects_in_workflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdUpdateListFilters'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to restore. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restore'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ListUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return void */ - public function crmV3ListsListIdUpdateListFilters($list_id, $list_filter_update_request, $enroll_objects_in_workflows = false, string $contentType = self::contentTypes['crmV3ListsListIdUpdateListFilters'][0]) + public function restore($list_id, string $contentType = self::contentTypes['restore'][0]) { - list($response) = $this->crmV3ListsListIdUpdateListFiltersWithHttpInfo($list_id, $list_filter_update_request, $enroll_objects_in_workflows, $contentType); - return $response; + $this->restoreWithHttpInfo($list_id, $contentType); } /** - * Operation crmV3ListsListIdUpdateListFiltersWithHttpInfo + * Operation restoreWithHttpInfo * - * Update List Filter Definition + * Restore a List * - * @param string $list_id The **ILS ID** of the list to update. (required) - * @param \HubSpot\Client\Crm\Lists\Model\ListFilterUpdateRequest $list_filter_update_request (required) - * @param bool|null $enroll_objects_in_workflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdUpdateListFilters'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to restore. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restore'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ListUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdUpdateListFiltersWithHttpInfo($list_id, $list_filter_update_request, $enroll_objects_in_workflows = false, string $contentType = self::contentTypes['crmV3ListsListIdUpdateListFilters'][0]) + public function restoreWithHttpInfo($list_id, string $contentType = self::contentTypes['restore'][0]) { - $request = $this->crmV3ListsListIdUpdateListFiltersRequest($list_id, $list_filter_update_request, $enroll_objects_in_workflows, $contentType); + $request = $this->restoreRequest($list_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -6469,51 +6497,9 @@ public function crmV3ListsListIdUpdateListFiltersWithHttpInfo($list_id, $list_fi $statusCode = $response->getStatusCode(); - switch($statusCode) { - case 200: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', - $request, - $response, - ); - default: - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\Error', - $request, - $response, - ); - } - - - - if ($statusCode < 200 || $statusCode > 299) { - throw new ApiException( - sprintf( - '[%d] Error connecting to the API (%s)', - $statusCode, - (string) $request->getUri() - ), - $statusCode, - $response->getHeaders(), - (string) $response->getBody() - ); - } - - return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', - $request, - $response, - ); + return [null, $statusCode, $response->getHeaders()]; } catch (ApiException $e) { switch ($e->getCode()) { - case 200: - $data = ObjectSerializer::deserialize( - $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', - $e->getResponseHeaders() - ); - $e->setResponseObject($data); - throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -6530,21 +6516,19 @@ public function crmV3ListsListIdUpdateListFiltersWithHttpInfo($list_id, $list_fi } /** - * Operation crmV3ListsListIdUpdateListFiltersAsync + * Operation restoreAsync * - * Update List Filter Definition + * Restore a List * - * @param string $list_id The **ILS ID** of the list to update. (required) - * @param \HubSpot\Client\Crm\Lists\Model\ListFilterUpdateRequest $list_filter_update_request (required) - * @param bool|null $enroll_objects_in_workflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdUpdateListFilters'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to restore. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restore'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdUpdateListFiltersAsync($list_id, $list_filter_update_request, $enroll_objects_in_workflows = false, string $contentType = self::contentTypes['crmV3ListsListIdUpdateListFilters'][0]) + public function restoreAsync($list_id, string $contentType = self::contentTypes['restore'][0]) { - return $this->crmV3ListsListIdUpdateListFiltersAsyncWithHttpInfo($list_id, $list_filter_update_request, $enroll_objects_in_workflows, $contentType) + return $this->restoreAsyncWithHttpInfo($list_id, $contentType) ->then( function ($response) { return $response[0]; @@ -6553,41 +6537,26 @@ function ($response) { } /** - * Operation crmV3ListsListIdUpdateListFiltersAsyncWithHttpInfo + * Operation restoreAsyncWithHttpInfo * - * Update List Filter Definition + * Restore a List * - * @param string $list_id The **ILS ID** of the list to update. (required) - * @param \HubSpot\Client\Crm\Lists\Model\ListFilterUpdateRequest $list_filter_update_request (required) - * @param bool|null $enroll_objects_in_workflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdUpdateListFilters'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to restore. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restore'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdUpdateListFiltersAsyncWithHttpInfo($list_id, $list_filter_update_request, $enroll_objects_in_workflows = false, string $contentType = self::contentTypes['crmV3ListsListIdUpdateListFilters'][0]) + public function restoreAsyncWithHttpInfo($list_id, string $contentType = self::contentTypes['restore'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse'; - $request = $this->crmV3ListsListIdUpdateListFiltersRequest($list_id, $list_filter_update_request, $enroll_objects_in_workflows, $contentType); + $returnType = ''; + $request = $this->restoreRequest($list_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - if ($returnType === '\SplFileObject') { - $content = $response->getBody(); //stream goes to serializer - } else { - $content = (string) $response->getBody(); - if ($returnType !== 'string') { - $content = json_decode($content); - } - } - - return [ - ObjectSerializer::deserialize($content, $returnType, []), - $response->getStatusCode(), - $response->getHeaders() - ]; + return [null, $response->getStatusCode(), $response->getHeaders()]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -6607,51 +6576,32 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdUpdateListFilters' + * Create request for operation 'restore' * - * @param string $list_id The **ILS ID** of the list to update. (required) - * @param \HubSpot\Client\Crm\Lists\Model\ListFilterUpdateRequest $list_filter_update_request (required) - * @param bool|null $enroll_objects_in_workflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdUpdateListFilters'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to restore. (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['restore'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdUpdateListFiltersRequest($list_id, $list_filter_update_request, $enroll_objects_in_workflows = false, string $contentType = self::contentTypes['crmV3ListsListIdUpdateListFilters'][0]) + public function restoreRequest($list_id, string $contentType = self::contentTypes['restore'][0]) { // verify the required parameter 'list_id' is set if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdUpdateListFilters' - ); - } - - // verify the required parameter 'list_filter_update_request' is set - if ($list_filter_update_request === null || (is_array($list_filter_update_request) && count($list_filter_update_request) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $list_filter_update_request when calling crmV3ListsListIdUpdateListFilters' + 'Missing the required parameter $list_id when calling restore' ); } - - $resourcePath = '/crm/v3/lists/{listId}/update-list-filters'; + $resourcePath = '/crm/v3/lists/{listId}/restore'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $enroll_objects_in_workflows, - 'enrollObjectsInWorkflows', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -6665,20 +6615,13 @@ public function crmV3ListsListIdUpdateListFiltersRequest($list_id, $list_filter_ $headers = $this->headerSelector->selectHeaders( - ['application/json', '*/*', ], + ['*/*', ], $contentType, $multipart ); // for model (json/xml) - if (isset($list_filter_update_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($list_filter_update_request), JSON_THROW_ON_ERROR); - } else { - $httpBody = $list_filter_update_request; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -6729,42 +6672,40 @@ public function crmV3ListsListIdUpdateListFiltersRequest($list_id, $list_filter_ } /** - * Operation crmV3ListsListIdUpdateListName + * Operation scheduleConversion * - * Update List Name + * Schedule or update the conversion of a list to static * - * @param string $list_id The **ILS ID** of the list to update. (required) - * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string|null $list_name The name to update the list to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdUpdateListName'] to see the possible values for this operation + * @param string $list_id The ID of the list to schedule the conversion for. (required) + * @param \HubSpot\Client\Crm\Lists\Model\PublicListConversionTime $public_list_conversion_time public_list_conversion_time (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['scheduleConversion'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ListUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListIdUpdateListName($list_id, $include_filters = false, $list_name = null, string $contentType = self::contentTypes['crmV3ListsListIdUpdateListName'][0]) + public function scheduleConversion($list_id, $public_list_conversion_time, string $contentType = self::contentTypes['scheduleConversion'][0]) { - list($response) = $this->crmV3ListsListIdUpdateListNameWithHttpInfo($list_id, $include_filters, $list_name, $contentType); + list($response) = $this->scheduleConversionWithHttpInfo($list_id, $public_list_conversion_time, $contentType); return $response; } /** - * Operation crmV3ListsListIdUpdateListNameWithHttpInfo + * Operation scheduleConversionWithHttpInfo * - * Update List Name + * Schedule or update the conversion of a list to static * - * @param string $list_id The **ILS ID** of the list to update. (required) - * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string|null $list_name The name to update the list to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdUpdateListName'] to see the possible values for this operation + * @param string $list_id The ID of the list to schedule the conversion for. (required) + * @param \HubSpot\Client\Crm\Lists\Model\PublicListConversionTime $public_list_conversion_time (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['scheduleConversion'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ListUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListIdUpdateListNameWithHttpInfo($list_id, $include_filters = false, $list_name = null, string $contentType = self::contentTypes['crmV3ListsListIdUpdateListName'][0]) + public function scheduleConversionWithHttpInfo($list_id, $public_list_conversion_time, string $contentType = self::contentTypes['scheduleConversion'][0]) { - $request = $this->crmV3ListsListIdUpdateListNameRequest($list_id, $include_filters, $list_name, $contentType); + $request = $this->scheduleConversionRequest($list_id, $public_list_conversion_time, $contentType); try { $options = $this->createHttpClientOption(); @@ -6792,7 +6733,7 @@ public function crmV3ListsListIdUpdateListNameWithHttpInfo($list_id, $include_fi switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', $request, $response, ); @@ -6820,7 +6761,7 @@ public function crmV3ListsListIdUpdateListNameWithHttpInfo($list_id, $include_fi } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', $request, $response, ); @@ -6829,7 +6770,7 @@ public function crmV3ListsListIdUpdateListNameWithHttpInfo($list_id, $include_fi case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', + '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -6850,21 +6791,20 @@ public function crmV3ListsListIdUpdateListNameWithHttpInfo($list_id, $include_fi } /** - * Operation crmV3ListsListIdUpdateListNameAsync + * Operation scheduleConversionAsync * - * Update List Name + * Schedule or update the conversion of a list to static * - * @param string $list_id The **ILS ID** of the list to update. (required) - * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string|null $list_name The name to update the list to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdUpdateListName'] to see the possible values for this operation + * @param string $list_id The ID of the list to schedule the conversion for. (required) + * @param \HubSpot\Client\Crm\Lists\Model\PublicListConversionTime $public_list_conversion_time (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['scheduleConversion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdUpdateListNameAsync($list_id, $include_filters = false, $list_name = null, string $contentType = self::contentTypes['crmV3ListsListIdUpdateListName'][0]) + public function scheduleConversionAsync($list_id, $public_list_conversion_time, string $contentType = self::contentTypes['scheduleConversion'][0]) { - return $this->crmV3ListsListIdUpdateListNameAsyncWithHttpInfo($list_id, $include_filters, $list_name, $contentType) + return $this->scheduleConversionAsyncWithHttpInfo($list_id, $public_list_conversion_time, $contentType) ->then( function ($response) { return $response[0]; @@ -6873,22 +6813,21 @@ function ($response) { } /** - * Operation crmV3ListsListIdUpdateListNameAsyncWithHttpInfo + * Operation scheduleConversionAsyncWithHttpInfo * - * Update List Name + * Schedule or update the conversion of a list to static * - * @param string $list_id The **ILS ID** of the list to update. (required) - * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string|null $list_name The name to update the list to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdUpdateListName'] to see the possible values for this operation + * @param string $list_id The ID of the list to schedule the conversion for. (required) + * @param \HubSpot\Client\Crm\Lists\Model\PublicListConversionTime $public_list_conversion_time (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['scheduleConversion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListIdUpdateListNameAsyncWithHttpInfo($list_id, $include_filters = false, $list_name = null, string $contentType = self::contentTypes['crmV3ListsListIdUpdateListName'][0]) + public function scheduleConversionAsyncWithHttpInfo($list_id, $public_list_conversion_time, string $contentType = self::contentTypes['scheduleConversion'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse'; - $request = $this->crmV3ListsListIdUpdateListNameRequest($list_id, $include_filters, $list_name, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\PublicListConversionResponse'; + $request = $this->scheduleConversionRequest($list_id, $public_list_conversion_time, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -6927,54 +6866,40 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListIdUpdateListName' + * Create request for operation 'scheduleConversion' * - * @param string $list_id The **ILS ID** of the list to update. (required) - * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string|null $list_name The name to update the list to. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListIdUpdateListName'] to see the possible values for this operation + * @param string $list_id The ID of the list to schedule the conversion for. (required) + * @param \HubSpot\Client\Crm\Lists\Model\PublicListConversionTime $public_list_conversion_time (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['scheduleConversion'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListIdUpdateListNameRequest($list_id, $include_filters = false, $list_name = null, string $contentType = self::contentTypes['crmV3ListsListIdUpdateListName'][0]) + public function scheduleConversionRequest($list_id, $public_list_conversion_time, string $contentType = self::contentTypes['scheduleConversion'][0]) { // verify the required parameter 'list_id' is set if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListIdUpdateListName' + 'Missing the required parameter $list_id when calling scheduleConversion' ); } + // verify the required parameter 'public_list_conversion_time' is set + if ($public_list_conversion_time === null || (is_array($public_list_conversion_time) && count($public_list_conversion_time) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $public_list_conversion_time when calling scheduleConversion' + ); + } - - $resourcePath = '/crm/v3/lists/{listId}/update-list-name'; + $resourcePath = '/crm/v3/lists/{listId}/schedule-conversion'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include_filters, - 'includeFilters', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $list_name, - 'listName', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -6994,7 +6919,14 @@ public function crmV3ListsListIdUpdateListNameRequest($list_id, $include_filters ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($public_list_conversion_time)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($public_list_conversion_time), JSON_THROW_ON_ERROR); + } else { + $httpBody = $public_list_conversion_time; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -7045,37 +6977,38 @@ public function crmV3ListsListIdUpdateListNameRequest($list_id, $include_filters } /** - * Operation crmV3ListsListId_0 + * Operation translateLegacyListIdToListId * - * Delete a List + * Translate Legacy List Id to Modern List Id * - * @param string $list_id The **ILS ID** of the list to delete. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListId_0'] to see the possible values for this operation + * @param string|null $legacy_list_id The legacy list id from lists v1 API. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['translateLegacyListIdToListId'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return void + * @return \HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsListId_0($list_id, string $contentType = self::contentTypes['crmV3ListsListId_0'][0]) + public function translateLegacyListIdToListId($legacy_list_id = null, string $contentType = self::contentTypes['translateLegacyListIdToListId'][0]) { - $this->crmV3ListsListId_0WithHttpInfo($list_id, $contentType); + list($response) = $this->translateLegacyListIdToListIdWithHttpInfo($legacy_list_id, $contentType); + return $response; } /** - * Operation crmV3ListsListId_0WithHttpInfo + * Operation translateLegacyListIdToListIdWithHttpInfo * - * Delete a List + * Translate Legacy List Id to Modern List Id * - * @param string $list_id The **ILS ID** of the list to delete. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListId_0'] to see the possible values for this operation + * @param string|null $legacy_list_id The legacy list id from lists v1 API. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['translateLegacyListIdToListId'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of null, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsListId_0WithHttpInfo($list_id, string $contentType = self::contentTypes['crmV3ListsListId_0'][0]) + public function translateLegacyListIdToListIdWithHttpInfo($legacy_list_id = null, string $contentType = self::contentTypes['translateLegacyListIdToListId'][0]) { - $request = $this->crmV3ListsListId_0Request($list_id, $contentType); + $request = $this->translateLegacyListIdToListIdRequest($legacy_list_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -7100,9 +7033,51 @@ public function crmV3ListsListId_0WithHttpInfo($list_id, string $contentType = s $statusCode = $response->getStatusCode(); - return [null, $statusCode, $response->getHeaders()]; + switch($statusCode) { + case 200: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping', + $request, + $response, + ); + default: + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\Error', + $request, + $response, + ); + } + + + + if ($statusCode < 200 || $statusCode > 299) { + throw new ApiException( + sprintf( + '[%d] Error connecting to the API (%s)', + $statusCode, + (string) $request->getUri() + ), + $statusCode, + $response->getHeaders(), + (string) $response->getBody() + ); + } + + return $this->handleResponseWithDataType( + '\HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping', + $request, + $response, + ); } catch (ApiException $e) { switch ($e->getCode()) { + case 200: + $data = ObjectSerializer::deserialize( + $e->getResponseBody(), + '\HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping', + $e->getResponseHeaders() + ); + $e->setResponseObject($data); + throw $e; default: $data = ObjectSerializer::deserialize( $e->getResponseBody(), @@ -7119,19 +7094,19 @@ public function crmV3ListsListId_0WithHttpInfo($list_id, string $contentType = s } /** - * Operation crmV3ListsListId_0Async + * Operation translateLegacyListIdToListIdAsync * - * Delete a List + * Translate Legacy List Id to Modern List Id * - * @param string $list_id The **ILS ID** of the list to delete. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListId_0'] to see the possible values for this operation + * @param string|null $legacy_list_id The legacy list id from lists v1 API. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['translateLegacyListIdToListId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListId_0Async($list_id, string $contentType = self::contentTypes['crmV3ListsListId_0'][0]) + public function translateLegacyListIdToListIdAsync($legacy_list_id = null, string $contentType = self::contentTypes['translateLegacyListIdToListId'][0]) { - return $this->crmV3ListsListId_0AsyncWithHttpInfo($list_id, $contentType) + return $this->translateLegacyListIdToListIdAsyncWithHttpInfo($legacy_list_id, $contentType) ->then( function ($response) { return $response[0]; @@ -7140,26 +7115,39 @@ function ($response) { } /** - * Operation crmV3ListsListId_0AsyncWithHttpInfo + * Operation translateLegacyListIdToListIdAsyncWithHttpInfo * - * Delete a List + * Translate Legacy List Id to Modern List Id * - * @param string $list_id The **ILS ID** of the list to delete. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListId_0'] to see the possible values for this operation + * @param string|null $legacy_list_id The legacy list id from lists v1 API. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['translateLegacyListIdToListId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsListId_0AsyncWithHttpInfo($list_id, string $contentType = self::contentTypes['crmV3ListsListId_0'][0]) + public function translateLegacyListIdToListIdAsyncWithHttpInfo($legacy_list_id = null, string $contentType = self::contentTypes['translateLegacyListIdToListId'][0]) { - $returnType = ''; - $request = $this->crmV3ListsListId_0Request($list_id, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\PublicMigrationMapping'; + $request = $this->translateLegacyListIdToListIdRequest($legacy_list_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) ->then( function ($response) use ($returnType) { - return [null, $response->getStatusCode(), $response->getHeaders()]; + if ($returnType === '\SplFileObject') { + $content = $response->getBody(); //stream goes to serializer + } else { + $content = (string) $response->getBody(); + if ($returnType !== 'string') { + $content = json_decode($content); + } + } + + return [ + ObjectSerializer::deserialize($content, $returnType, []), + $response->getStatusCode(), + $response->getHeaders() + ]; }, function ($exception) { $response = method_exists($exception, 'getResponse') ? $exception->getResponse() : null; @@ -7179,46 +7167,41 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsListId_0' + * Create request for operation 'translateLegacyListIdToListId' * - * @param string $list_id The **ILS ID** of the list to delete. (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsListId_0'] to see the possible values for this operation + * @param string|null $legacy_list_id The legacy list id from lists v1 API. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['translateLegacyListIdToListId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsListId_0Request($list_id, string $contentType = self::contentTypes['crmV3ListsListId_0'][0]) + public function translateLegacyListIdToListIdRequest($legacy_list_id = null, string $contentType = self::contentTypes['translateLegacyListIdToListId'][0]) { - // verify the required parameter 'list_id' is set - if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $list_id when calling crmV3ListsListId_0' - ); - } - $resourcePath = '/crm/v3/lists/{listId}'; + $resourcePath = '/crm/v3/lists/idmapping'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $legacy_list_id, + 'legacyListId', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - // path params - if ($list_id !== null) { - $resourcePath = str_replace( - '{' . 'listId' . '}', - ObjectSerializer::toPathValue($list_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( - ['*/*', ], + ['application/json', '*/*', ], $contentType, $multipart ); @@ -7267,7 +7250,7 @@ public function crmV3ListsListId_0Request($list_id, string $contentType = self:: $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'DELETE', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -7275,42 +7258,38 @@ public function crmV3ListsListId_0Request($list_id, string $contentType = self:: } /** - * Operation crmV3ListsObjectTypeIdObjectTypeIdNameListName + * Operation translateLegacyListIdToListIdBatch * - * Retrieve List by Name + * Translate Legacy List Id to Modern List Id in Batch * - * @param string $list_name The name of the list to fetch. This is **not** case sensitive. (required) - * @param string $object_type_id The object type ID of the object types stored by the list to fetch. For example, `0-1` for a `CONTACT` list. (required) - * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsObjectTypeIdObjectTypeIdNameListName'] to see the possible values for this operation + * @param string[] $request_body request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['translateLegacyListIdToListIdBatch'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ListFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsObjectTypeIdObjectTypeIdNameListName($list_name, $object_type_id, $include_filters = false, string $contentType = self::contentTypes['crmV3ListsObjectTypeIdObjectTypeIdNameListName'][0]) + public function translateLegacyListIdToListIdBatch($request_body, string $contentType = self::contentTypes['translateLegacyListIdToListIdBatch'][0]) { - list($response) = $this->crmV3ListsObjectTypeIdObjectTypeIdNameListNameWithHttpInfo($list_name, $object_type_id, $include_filters, $contentType); + list($response) = $this->translateLegacyListIdToListIdBatchWithHttpInfo($request_body, $contentType); return $response; } /** - * Operation crmV3ListsObjectTypeIdObjectTypeIdNameListNameWithHttpInfo + * Operation translateLegacyListIdToListIdBatchWithHttpInfo * - * Retrieve List by Name + * Translate Legacy List Id to Modern List Id in Batch * - * @param string $list_name The name of the list to fetch. This is **not** case sensitive. (required) - * @param string $object_type_id The object type ID of the object types stored by the list to fetch. For example, `0-1` for a `CONTACT` list. (required) - * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsObjectTypeIdObjectTypeIdNameListName'] to see the possible values for this operation + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['translateLegacyListIdToListIdBatch'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ListFetchResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameWithHttpInfo($list_name, $object_type_id, $include_filters = false, string $contentType = self::contentTypes['crmV3ListsObjectTypeIdObjectTypeIdNameListName'][0]) + public function translateLegacyListIdToListIdBatchWithHttpInfo($request_body, string $contentType = self::contentTypes['translateLegacyListIdToListIdBatch'][0]) { - $request = $this->crmV3ListsObjectTypeIdObjectTypeIdNameListNameRequest($list_name, $object_type_id, $include_filters, $contentType); + $request = $this->translateLegacyListIdToListIdBatchRequest($request_body, $contentType); try { $options = $this->createHttpClientOption(); @@ -7338,7 +7317,7 @@ public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameWithHttpInfo($list switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListFetchResponse', + '\HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping', $request, $response, ); @@ -7366,7 +7345,7 @@ public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameWithHttpInfo($list } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListFetchResponse', + '\HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping', $request, $response, ); @@ -7375,7 +7354,7 @@ public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameWithHttpInfo($list case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ListFetchResponse', + '\HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -7396,21 +7375,19 @@ public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameWithHttpInfo($list } /** - * Operation crmV3ListsObjectTypeIdObjectTypeIdNameListNameAsync + * Operation translateLegacyListIdToListIdBatchAsync * - * Retrieve List by Name + * Translate Legacy List Id to Modern List Id in Batch * - * @param string $list_name The name of the list to fetch. This is **not** case sensitive. (required) - * @param string $object_type_id The object type ID of the object types stored by the list to fetch. For example, `0-1` for a `CONTACT` list. (required) - * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsObjectTypeIdObjectTypeIdNameListName'] to see the possible values for this operation + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['translateLegacyListIdToListIdBatch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameAsync($list_name, $object_type_id, $include_filters = false, string $contentType = self::contentTypes['crmV3ListsObjectTypeIdObjectTypeIdNameListName'][0]) + public function translateLegacyListIdToListIdBatchAsync($request_body, string $contentType = self::contentTypes['translateLegacyListIdToListIdBatch'][0]) { - return $this->crmV3ListsObjectTypeIdObjectTypeIdNameListNameAsyncWithHttpInfo($list_name, $object_type_id, $include_filters, $contentType) + return $this->translateLegacyListIdToListIdBatchAsyncWithHttpInfo($request_body, $contentType) ->then( function ($response) { return $response[0]; @@ -7419,22 +7396,20 @@ function ($response) { } /** - * Operation crmV3ListsObjectTypeIdObjectTypeIdNameListNameAsyncWithHttpInfo + * Operation translateLegacyListIdToListIdBatchAsyncWithHttpInfo * - * Retrieve List by Name + * Translate Legacy List Id to Modern List Id in Batch * - * @param string $list_name The name of the list to fetch. This is **not** case sensitive. (required) - * @param string $object_type_id The object type ID of the object types stored by the list to fetch. For example, `0-1` for a `CONTACT` list. (required) - * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsObjectTypeIdObjectTypeIdNameListName'] to see the possible values for this operation + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['translateLegacyListIdToListIdBatch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameAsyncWithHttpInfo($list_name, $object_type_id, $include_filters = false, string $contentType = self::contentTypes['crmV3ListsObjectTypeIdObjectTypeIdNameListName'][0]) + public function translateLegacyListIdToListIdBatchAsyncWithHttpInfo($request_body, string $contentType = self::contentTypes['translateLegacyListIdToListIdBatch'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ListFetchResponse'; - $request = $this->crmV3ListsObjectTypeIdObjectTypeIdNameListNameRequest($list_name, $object_type_id, $include_filters, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\PublicBatchMigrationMapping'; + $request = $this->translateLegacyListIdToListIdBatchRequest($request_body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7473,69 +7448,34 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsObjectTypeIdObjectTypeIdNameListName' + * Create request for operation 'translateLegacyListIdToListIdBatch' * - * @param string $list_name The name of the list to fetch. This is **not** case sensitive. (required) - * @param string $object_type_id The object type ID of the object types stored by the list to fetch. For example, `0-1` for a `CONTACT` list. (required) - * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsObjectTypeIdObjectTypeIdNameListName'] to see the possible values for this operation + * @param string[] $request_body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['translateLegacyListIdToListIdBatch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameRequest($list_name, $object_type_id, $include_filters = false, string $contentType = self::contentTypes['crmV3ListsObjectTypeIdObjectTypeIdNameListName'][0]) + public function translateLegacyListIdToListIdBatchRequest($request_body, string $contentType = self::contentTypes['translateLegacyListIdToListIdBatch'][0]) { - // verify the required parameter 'list_name' is set - if ($list_name === null || (is_array($list_name) && count($list_name) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $list_name when calling crmV3ListsObjectTypeIdObjectTypeIdNameListName' - ); - } - - // verify the required parameter 'object_type_id' is set - if ($object_type_id === null || (is_array($object_type_id) && count($object_type_id) === 0)) { + // verify the required parameter 'request_body' is set + if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $object_type_id when calling crmV3ListsObjectTypeIdObjectTypeIdNameListName' + 'Missing the required parameter $request_body when calling translateLegacyListIdToListIdBatch' ); } - - $resourcePath = '/crm/v3/lists/object-type-id/{objectTypeId}/name/{listName}'; + $resourcePath = '/crm/v3/lists/idmapping'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include_filters, - 'includeFilters', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // path params - if ($list_name !== null) { - $resourcePath = str_replace( - '{' . 'listName' . '}', - ObjectSerializer::toPathValue($list_name), - $resourcePath - ); - } - // path params - if ($object_type_id !== null) { - $resourcePath = str_replace( - '{' . 'objectTypeId' . '}', - ObjectSerializer::toPathValue($object_type_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -7545,7 +7485,14 @@ public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameRequest($list_name ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($request_body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($request_body), JSON_THROW_ON_ERROR); + } else { + $httpBody = $request_body; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -7588,7 +7535,7 @@ public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameRequest($list_name $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -7596,40 +7543,42 @@ public function crmV3ListsObjectTypeIdObjectTypeIdNameListNameRequest($list_name } /** - * Operation crmV3ListsRecordsObjectTypeIdRecordIdMemberships + * Operation updateListFilters * - * Get lists record is member of + * Update List Filter Definition * - * @param string $object_type_id Object type id of the record (required) - * @param string $record_id Id of the record (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsRecordsObjectTypeIdRecordIdMemberships'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to update. (required) + * @param \HubSpot\Client\Crm\Lists\Model\ListFilterUpdateRequest $list_filter_update_request list_filter_update_request (required) + * @param bool|null $enroll_objects_in_workflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateListFilters'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ListUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsRecordsObjectTypeIdRecordIdMemberships($object_type_id, $record_id, string $contentType = self::contentTypes['crmV3ListsRecordsObjectTypeIdRecordIdMemberships'][0]) + public function updateListFilters($list_id, $list_filter_update_request, $enroll_objects_in_workflows = false, string $contentType = self::contentTypes['updateListFilters'][0]) { - list($response) = $this->crmV3ListsRecordsObjectTypeIdRecordIdMembershipsWithHttpInfo($object_type_id, $record_id, $contentType); + list($response) = $this->updateListFiltersWithHttpInfo($list_id, $list_filter_update_request, $enroll_objects_in_workflows, $contentType); return $response; } /** - * Operation crmV3ListsRecordsObjectTypeIdRecordIdMembershipsWithHttpInfo + * Operation updateListFiltersWithHttpInfo * - * Get lists record is member of + * Update List Filter Definition * - * @param string $object_type_id Object type id of the record (required) - * @param string $record_id Id of the record (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsRecordsObjectTypeIdRecordIdMemberships'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to update. (required) + * @param \HubSpot\Client\Crm\Lists\Model\ListFilterUpdateRequest $list_filter_update_request (required) + * @param bool|null $enroll_objects_in_workflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateListFilters'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ListUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsWithHttpInfo($object_type_id, $record_id, string $contentType = self::contentTypes['crmV3ListsRecordsObjectTypeIdRecordIdMemberships'][0]) + public function updateListFiltersWithHttpInfo($list_id, $list_filter_update_request, $enroll_objects_in_workflows = false, string $contentType = self::contentTypes['updateListFilters'][0]) { - $request = $this->crmV3ListsRecordsObjectTypeIdRecordIdMembershipsRequest($object_type_id, $record_id, $contentType); + $request = $this->updateListFiltersRequest($list_id, $list_filter_update_request, $enroll_objects_in_workflows, $contentType); try { $options = $this->createHttpClientOption(); @@ -7657,7 +7606,7 @@ public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsWithHttpInfo($ob switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership', + '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', $request, $response, ); @@ -7685,7 +7634,7 @@ public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsWithHttpInfo($ob } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership', + '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', $request, $response, ); @@ -7694,7 +7643,7 @@ public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsWithHttpInfo($ob case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership', + '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -7715,20 +7664,21 @@ public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsWithHttpInfo($ob } /** - * Operation crmV3ListsRecordsObjectTypeIdRecordIdMembershipsAsync + * Operation updateListFiltersAsync * - * Get lists record is member of + * Update List Filter Definition * - * @param string $object_type_id Object type id of the record (required) - * @param string $record_id Id of the record (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsRecordsObjectTypeIdRecordIdMemberships'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to update. (required) + * @param \HubSpot\Client\Crm\Lists\Model\ListFilterUpdateRequest $list_filter_update_request (required) + * @param bool|null $enroll_objects_in_workflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateListFilters'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsAsync($object_type_id, $record_id, string $contentType = self::contentTypes['crmV3ListsRecordsObjectTypeIdRecordIdMemberships'][0]) + public function updateListFiltersAsync($list_id, $list_filter_update_request, $enroll_objects_in_workflows = false, string $contentType = self::contentTypes['updateListFilters'][0]) { - return $this->crmV3ListsRecordsObjectTypeIdRecordIdMembershipsAsyncWithHttpInfo($object_type_id, $record_id, $contentType) + return $this->updateListFiltersAsyncWithHttpInfo($list_id, $list_filter_update_request, $enroll_objects_in_workflows, $contentType) ->then( function ($response) { return $response[0]; @@ -7737,21 +7687,22 @@ function ($response) { } /** - * Operation crmV3ListsRecordsObjectTypeIdRecordIdMembershipsAsyncWithHttpInfo + * Operation updateListFiltersAsyncWithHttpInfo * - * Get lists record is member of + * Update List Filter Definition * - * @param string $object_type_id Object type id of the record (required) - * @param string $record_id Id of the record (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsRecordsObjectTypeIdRecordIdMemberships'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to update. (required) + * @param \HubSpot\Client\Crm\Lists\Model\ListFilterUpdateRequest $list_filter_update_request (required) + * @param bool|null $enroll_objects_in_workflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateListFilters'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsAsyncWithHttpInfo($object_type_id, $record_id, string $contentType = self::contentTypes['crmV3ListsRecordsObjectTypeIdRecordIdMemberships'][0]) + public function updateListFiltersAsyncWithHttpInfo($list_id, $list_filter_update_request, $enroll_objects_in_workflows = false, string $contentType = self::contentTypes['updateListFilters'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ApiCollectionResponseRecordListMembership'; - $request = $this->crmV3ListsRecordsObjectTypeIdRecordIdMembershipsRequest($object_type_id, $record_id, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse'; + $request = $this->updateListFiltersRequest($list_id, $list_filter_update_request, $enroll_objects_in_workflows, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -7790,55 +7741,58 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsRecordsObjectTypeIdRecordIdMemberships' + * Create request for operation 'updateListFilters' * - * @param string $object_type_id Object type id of the record (required) - * @param string $record_id Id of the record (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsRecordsObjectTypeIdRecordIdMemberships'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to update. (required) + * @param \HubSpot\Client\Crm\Lists\Model\ListFilterUpdateRequest $list_filter_update_request (required) + * @param bool|null $enroll_objects_in_workflows A flag indicating whether or not the memberships added to the list as a result of the filter change should be enrolled in workflows that are relevant to this list. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateListFilters'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsRequest($object_type_id, $record_id, string $contentType = self::contentTypes['crmV3ListsRecordsObjectTypeIdRecordIdMemberships'][0]) + public function updateListFiltersRequest($list_id, $list_filter_update_request, $enroll_objects_in_workflows = false, string $contentType = self::contentTypes['updateListFilters'][0]) { - // verify the required parameter 'object_type_id' is set - if ($object_type_id === null || (is_array($object_type_id) && count($object_type_id) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $object_type_id when calling crmV3ListsRecordsObjectTypeIdRecordIdMemberships' + 'Missing the required parameter $list_id when calling updateListFilters' ); } - // verify the required parameter 'record_id' is set - if ($record_id === null || (is_array($record_id) && count($record_id) === 0)) { + // verify the required parameter 'list_filter_update_request' is set + if ($list_filter_update_request === null || (is_array($list_filter_update_request) && count($list_filter_update_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $record_id when calling crmV3ListsRecordsObjectTypeIdRecordIdMemberships' + 'Missing the required parameter $list_filter_update_request when calling updateListFilters' ); } - $resourcePath = '/crm/v3/lists/records/{objectTypeId}/{recordId}/memberships'; + + $resourcePath = '/crm/v3/lists/{listId}/update-list-filters'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $enroll_objects_in_workflows, + 'enrollObjectsInWorkflows', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params - if ($object_type_id !== null) { - $resourcePath = str_replace( - '{' . 'objectTypeId' . '}', - ObjectSerializer::toPathValue($object_type_id), - $resourcePath - ); - } - // path params - if ($record_id !== null) { + if ($list_id !== null) { $resourcePath = str_replace( - '{' . 'recordId' . '}', - ObjectSerializer::toPathValue($record_id), + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($list_id), $resourcePath ); } @@ -7851,7 +7805,14 @@ public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsRequest($object_ ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($list_filter_update_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($list_filter_update_request), JSON_THROW_ON_ERROR); + } else { + $httpBody = $list_filter_update_request; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -7894,7 +7855,7 @@ public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsRequest($object_ $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -7902,34 +7863,42 @@ public function crmV3ListsRecordsObjectTypeIdRecordIdMembershipsRequest($object_ } /** - * Operation crmV3Lists_0 + * Operation updateName * - * @param \HubSpot\Client\Crm\Lists\Model\ListCreateRequest $list_create_request list_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Lists_0'] to see the possible values for this operation + * Update List Name + * + * @param string $list_id The **ILS ID** of the list to update. (required) + * @param string|null $list_name The name to update the list to. (optional) + * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateName'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Lists\Model\ListCreateResponse|\HubSpot\Client\Crm\Lists\Model\Error + * @return \HubSpot\Client\Crm\Lists\Model\ListUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3Lists_0($list_create_request, string $contentType = self::contentTypes['crmV3Lists_0'][0]) + public function updateName($list_id, $list_name = null, $include_filters = false, string $contentType = self::contentTypes['updateName'][0]) { - list($response) = $this->crmV3Lists_0WithHttpInfo($list_create_request, $contentType); + list($response) = $this->updateNameWithHttpInfo($list_id, $list_name, $include_filters, $contentType); return $response; } /** - * Operation crmV3Lists_0WithHttpInfo + * Operation updateNameWithHttpInfo * - * @param \HubSpot\Client\Crm\Lists\Model\ListCreateRequest $list_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Lists_0'] to see the possible values for this operation + * Update List Name + * + * @param string $list_id The **ILS ID** of the list to update. (required) + * @param string|null $list_name The name to update the list to. (optional) + * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateName'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Lists\Model\ListCreateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Lists\Model\ListUpdateResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3Lists_0WithHttpInfo($list_create_request, string $contentType = self::contentTypes['crmV3Lists_0'][0]) + public function updateNameWithHttpInfo($list_id, $list_name = null, $include_filters = false, string $contentType = self::contentTypes['updateName'][0]) { - $request = $this->crmV3Lists_0Request($list_create_request, $contentType); + $request = $this->updateNameRequest($list_id, $list_name, $include_filters, $contentType); try { $options = $this->createHttpClientOption(); @@ -7957,7 +7926,7 @@ public function crmV3Lists_0WithHttpInfo($list_create_request, string $contentTy switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListCreateResponse', + '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', $request, $response, ); @@ -7985,7 +7954,7 @@ public function crmV3Lists_0WithHttpInfo($list_create_request, string $contentTy } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Lists\Model\ListCreateResponse', + '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', $request, $response, ); @@ -7994,7 +7963,7 @@ public function crmV3Lists_0WithHttpInfo($list_create_request, string $contentTy case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Lists\Model\ListCreateResponse', + '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -8015,17 +7984,21 @@ public function crmV3Lists_0WithHttpInfo($list_create_request, string $contentTy } /** - * Operation crmV3Lists_0Async + * Operation updateNameAsync * - * @param \HubSpot\Client\Crm\Lists\Model\ListCreateRequest $list_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Lists_0'] to see the possible values for this operation + * Update List Name + * + * @param string $list_id The **ILS ID** of the list to update. (required) + * @param string|null $list_name The name to update the list to. (optional) + * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateName'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3Lists_0Async($list_create_request, string $contentType = self::contentTypes['crmV3Lists_0'][0]) + public function updateNameAsync($list_id, $list_name = null, $include_filters = false, string $contentType = self::contentTypes['updateName'][0]) { - return $this->crmV3Lists_0AsyncWithHttpInfo($list_create_request, $contentType) + return $this->updateNameAsyncWithHttpInfo($list_id, $list_name, $include_filters, $contentType) ->then( function ($response) { return $response[0]; @@ -8034,18 +8007,22 @@ function ($response) { } /** - * Operation crmV3Lists_0AsyncWithHttpInfo + * Operation updateNameAsyncWithHttpInfo * - * @param \HubSpot\Client\Crm\Lists\Model\ListCreateRequest $list_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Lists_0'] to see the possible values for this operation + * Update List Name + * + * @param string $list_id The **ILS ID** of the list to update. (required) + * @param string|null $list_name The name to update the list to. (optional) + * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateName'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3Lists_0AsyncWithHttpInfo($list_create_request, string $contentType = self::contentTypes['crmV3Lists_0'][0]) + public function updateNameAsyncWithHttpInfo($list_id, $list_name = null, $include_filters = false, string $contentType = self::contentTypes['updateName'][0]) { - $returnType = '\HubSpot\Client\Crm\Lists\Model\ListCreateResponse'; - $request = $this->crmV3Lists_0Request($list_create_request, $contentType); + $returnType = '\HubSpot\Client\Crm\Lists\Model\ListUpdateResponse'; + $request = $this->updateNameRequest($list_id, $list_name, $include_filters, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -8084,34 +8061,64 @@ function ($exception) { } /** - * Create request for operation 'crmV3Lists_0' + * Create request for operation 'updateName' * - * @param \HubSpot\Client\Crm\Lists\Model\ListCreateRequest $list_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Lists_0'] to see the possible values for this operation + * @param string $list_id The **ILS ID** of the list to update. (required) + * @param string|null $list_name The name to update the list to. (optional) + * @param bool|null $include_filters A flag indicating whether or not the response object list definition should include a filter branch definition. By default, object list definitions will not have their filter branch definitions included in the response. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['updateName'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3Lists_0Request($list_create_request, string $contentType = self::contentTypes['crmV3Lists_0'][0]) + public function updateNameRequest($list_id, $list_name = null, $include_filters = false, string $contentType = self::contentTypes['updateName'][0]) { - // verify the required parameter 'list_create_request' is set - if ($list_create_request === null || (is_array($list_create_request) && count($list_create_request) === 0)) { + // verify the required parameter 'list_id' is set + if ($list_id === null || (is_array($list_id) && count($list_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_create_request when calling crmV3Lists_0' + 'Missing the required parameter $list_id when calling updateName' ); } - $resourcePath = '/crm/v3/lists'; + + + $resourcePath = '/crm/v3/lists/{listId}/update-list-name'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $list_name, + 'listName', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include_filters, + 'includeFilters', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // path params + if ($list_id !== null) { + $resourcePath = str_replace( + '{' . 'listId' . '}', + ObjectSerializer::toPathValue($list_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -8121,14 +8128,7 @@ public function crmV3Lists_0Request($list_create_request, string $contentType = ); // for model (json/xml) - if (isset($list_create_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($list_create_request), JSON_THROW_ON_ERROR); - } else { - $httpBody = $list_create_request; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -8171,7 +8171,7 @@ public function crmV3Lists_0Request($list_create_request, string $contentType = $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'PUT', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/codegen/Crm/Lists/Api/BatchApi.php b/codegen/Crm/Lists/Api/BatchApi.php index 4a84bccf..52b25e19 100644 --- a/codegen/Crm/Lists/Api/BatchApi.php +++ b/codegen/Crm/Lists/Api/BatchApi.php @@ -73,7 +73,7 @@ class BatchApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmV3ListsRecordsMembershipsBatchRead' => [ + 'read' => [ 'application/json', ], ]; @@ -125,34 +125,34 @@ public function getConfig() } /** - * Operation crmV3ListsRecordsMembershipsBatchRead + * Operation read * * @param \HubSpot\Client\Crm\Lists\Model\BatchInputRecordIdInput $batch_input_record_id_input batch_input_record_id_input (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsRecordsMembershipsBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Lists\Model\BatchResponseRecordIdWithMemberships|\HubSpot\Client\Crm\Lists\Model\BatchResponseRecordIdWithMembershipsWithErrors|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsRecordsMembershipsBatchRead($batch_input_record_id_input, string $contentType = self::contentTypes['crmV3ListsRecordsMembershipsBatchRead'][0]) + public function read($batch_input_record_id_input, string $contentType = self::contentTypes['read'][0]) { - list($response) = $this->crmV3ListsRecordsMembershipsBatchReadWithHttpInfo($batch_input_record_id_input, $contentType); + list($response) = $this->readWithHttpInfo($batch_input_record_id_input, $contentType); return $response; } /** - * Operation crmV3ListsRecordsMembershipsBatchReadWithHttpInfo + * Operation readWithHttpInfo * * @param \HubSpot\Client\Crm\Lists\Model\BatchInputRecordIdInput $batch_input_record_id_input (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsRecordsMembershipsBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Lists\Model\BatchResponseRecordIdWithMemberships|\HubSpot\Client\Crm\Lists\Model\BatchResponseRecordIdWithMembershipsWithErrors|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsRecordsMembershipsBatchReadWithHttpInfo($batch_input_record_id_input, string $contentType = self::contentTypes['crmV3ListsRecordsMembershipsBatchRead'][0]) + public function readWithHttpInfo($batch_input_record_id_input, string $contentType = self::contentTypes['read'][0]) { - $request = $this->crmV3ListsRecordsMembershipsBatchReadRequest($batch_input_record_id_input, $contentType); + $request = $this->readRequest($batch_input_record_id_input, $contentType); try { $options = $this->createHttpClientOption(); @@ -252,17 +252,17 @@ public function crmV3ListsRecordsMembershipsBatchReadWithHttpInfo($batch_input_r } /** - * Operation crmV3ListsRecordsMembershipsBatchReadAsync + * Operation readAsync * * @param \HubSpot\Client\Crm\Lists\Model\BatchInputRecordIdInput $batch_input_record_id_input (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsRecordsMembershipsBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsRecordsMembershipsBatchReadAsync($batch_input_record_id_input, string $contentType = self::contentTypes['crmV3ListsRecordsMembershipsBatchRead'][0]) + public function readAsync($batch_input_record_id_input, string $contentType = self::contentTypes['read'][0]) { - return $this->crmV3ListsRecordsMembershipsBatchReadAsyncWithHttpInfo($batch_input_record_id_input, $contentType) + return $this->readAsyncWithHttpInfo($batch_input_record_id_input, $contentType) ->then( function ($response) { return $response[0]; @@ -271,18 +271,18 @@ function ($response) { } /** - * Operation crmV3ListsRecordsMembershipsBatchReadAsyncWithHttpInfo + * Operation readAsyncWithHttpInfo * * @param \HubSpot\Client\Crm\Lists\Model\BatchInputRecordIdInput $batch_input_record_id_input (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsRecordsMembershipsBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsRecordsMembershipsBatchReadAsyncWithHttpInfo($batch_input_record_id_input, string $contentType = self::contentTypes['crmV3ListsRecordsMembershipsBatchRead'][0]) + public function readAsyncWithHttpInfo($batch_input_record_id_input, string $contentType = self::contentTypes['read'][0]) { $returnType = '\HubSpot\Client\Crm\Lists\Model\BatchResponseRecordIdWithMemberships'; - $request = $this->crmV3ListsRecordsMembershipsBatchReadRequest($batch_input_record_id_input, $contentType); + $request = $this->readRequest($batch_input_record_id_input, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -321,21 +321,21 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsRecordsMembershipsBatchRead' + * Create request for operation 'read' * * @param \HubSpot\Client\Crm\Lists\Model\BatchInputRecordIdInput $batch_input_record_id_input (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsRecordsMembershipsBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsRecordsMembershipsBatchReadRequest($batch_input_record_id_input, string $contentType = self::contentTypes['crmV3ListsRecordsMembershipsBatchRead'][0]) + public function readRequest($batch_input_record_id_input, string $contentType = self::contentTypes['read'][0]) { // verify the required parameter 'batch_input_record_id_input' is set if ($batch_input_record_id_input === null || (is_array($batch_input_record_id_input) && count($batch_input_record_id_input) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $batch_input_record_id_input when calling crmV3ListsRecordsMembershipsBatchRead' + 'Missing the required parameter $batch_input_record_id_input when calling read' ); } diff --git a/codegen/Crm/Lists/Api/SearchApi.php b/codegen/Crm/Lists/Api/SearchApi.php index c2174391..b69d7ab5 100644 --- a/codegen/Crm/Lists/Api/SearchApi.php +++ b/codegen/Crm/Lists/Api/SearchApi.php @@ -73,7 +73,7 @@ class SearchApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmV3ListsSearch' => [ + 'doSearch' => [ 'application/json', ], ]; @@ -125,38 +125,38 @@ public function getConfig() } /** - * Operation crmV3ListsSearch + * Operation doSearch * * Search Lists * * @param \HubSpot\Client\Crm\Lists\Model\ListSearchRequest $list_search_request list_search_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsSearch'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Lists\Model\ListSearchResponse|\HubSpot\Client\Crm\Lists\Model\Error */ - public function crmV3ListsSearch($list_search_request, string $contentType = self::contentTypes['crmV3ListsSearch'][0]) + public function doSearch($list_search_request, string $contentType = self::contentTypes['doSearch'][0]) { - list($response) = $this->crmV3ListsSearchWithHttpInfo($list_search_request, $contentType); + list($response) = $this->doSearchWithHttpInfo($list_search_request, $contentType); return $response; } /** - * Operation crmV3ListsSearchWithHttpInfo + * Operation doSearchWithHttpInfo * * Search Lists * * @param \HubSpot\Client\Crm\Lists\Model\ListSearchRequest $list_search_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsSearch'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Lists\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Lists\Model\ListSearchResponse|\HubSpot\Client\Crm\Lists\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3ListsSearchWithHttpInfo($list_search_request, string $contentType = self::contentTypes['crmV3ListsSearch'][0]) + public function doSearchWithHttpInfo($list_search_request, string $contentType = self::contentTypes['doSearch'][0]) { - $request = $this->crmV3ListsSearchRequest($list_search_request, $contentType); + $request = $this->doSearchRequest($list_search_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -242,19 +242,19 @@ public function crmV3ListsSearchWithHttpInfo($list_search_request, string $conte } /** - * Operation crmV3ListsSearchAsync + * Operation doSearchAsync * * Search Lists * * @param \HubSpot\Client\Crm\Lists\Model\ListSearchRequest $list_search_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsSearch'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsSearchAsync($list_search_request, string $contentType = self::contentTypes['crmV3ListsSearch'][0]) + public function doSearchAsync($list_search_request, string $contentType = self::contentTypes['doSearch'][0]) { - return $this->crmV3ListsSearchAsyncWithHttpInfo($list_search_request, $contentType) + return $this->doSearchAsyncWithHttpInfo($list_search_request, $contentType) ->then( function ($response) { return $response[0]; @@ -263,20 +263,20 @@ function ($response) { } /** - * Operation crmV3ListsSearchAsyncWithHttpInfo + * Operation doSearchAsyncWithHttpInfo * * Search Lists * * @param \HubSpot\Client\Crm\Lists\Model\ListSearchRequest $list_search_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsSearch'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3ListsSearchAsyncWithHttpInfo($list_search_request, string $contentType = self::contentTypes['crmV3ListsSearch'][0]) + public function doSearchAsyncWithHttpInfo($list_search_request, string $contentType = self::contentTypes['doSearch'][0]) { $returnType = '\HubSpot\Client\Crm\Lists\Model\ListSearchResponse'; - $request = $this->crmV3ListsSearchRequest($list_search_request, $contentType); + $request = $this->doSearchRequest($list_search_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -315,21 +315,21 @@ function ($exception) { } /** - * Create request for operation 'crmV3ListsSearch' + * Create request for operation 'doSearch' * * @param \HubSpot\Client\Crm\Lists\Model\ListSearchRequest $list_search_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3ListsSearch'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3ListsSearchRequest($list_search_request, string $contentType = self::contentTypes['crmV3ListsSearch'][0]) + public function doSearchRequest($list_search_request, string $contentType = self::contentTypes['doSearch'][0]) { // verify the required parameter 'list_search_request' is set if ($list_search_request === null || (is_array($list_search_request) && count($list_search_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $list_search_request when calling crmV3ListsSearch' + 'Missing the required parameter $list_search_request when calling doSearch' ); } diff --git a/codegen/Crm/Objects/Api/BasicApi.php b/codegen/Crm/Objects/Api/BasicApi.php index 707f5fa4..7a702730 100644 --- a/codegen/Crm/Objects/Api/BasicApi.php +++ b/codegen/Crm/Objects/Api/BasicApi.php @@ -141,17 +141,17 @@ public function getConfig() * * Archive * - * @param string $object_id (required) * @param string $object_type (required) + * @param string $object_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function archive($object_id, $object_type, string $contentType = self::contentTypes['archive'][0]) + public function archive($object_type, $object_id, string $contentType = self::contentTypes['archive'][0]) { - $this->archiveWithHttpInfo($object_id, $object_type, $contentType); + $this->archiveWithHttpInfo($object_type, $object_id, $contentType); } /** @@ -159,17 +159,17 @@ public function archive($object_id, $object_type, string $contentType = self::co * * Archive * - * @param string $object_id (required) * @param string $object_type (required) + * @param string $object_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveWithHttpInfo($object_id, $object_type, string $contentType = self::contentTypes['archive'][0]) + public function archiveWithHttpInfo($object_type, $object_id, string $contentType = self::contentTypes['archive'][0]) { - $request = $this->archiveRequest($object_id, $object_type, $contentType); + $request = $this->archiveRequest($object_type, $object_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -217,16 +217,16 @@ public function archiveWithHttpInfo($object_id, $object_type, string $contentTyp * * Archive * - * @param string $object_id (required) * @param string $object_type (required) + * @param string $object_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsync($object_id, $object_type, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsync($object_type, $object_id, string $contentType = self::contentTypes['archive'][0]) { - return $this->archiveAsyncWithHttpInfo($object_id, $object_type, $contentType) + return $this->archiveAsyncWithHttpInfo($object_type, $object_id, $contentType) ->then( function ($response) { return $response[0]; @@ -239,17 +239,17 @@ function ($response) { * * Archive * - * @param string $object_id (required) * @param string $object_type (required) + * @param string $object_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsyncWithHttpInfo($object_id, $object_type, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsyncWithHttpInfo($object_type, $object_id, string $contentType = self::contentTypes['archive'][0]) { $returnType = ''; - $request = $this->archiveRequest($object_id, $object_type, $contentType); + $request = $this->archiveRequest($object_type, $object_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -277,27 +277,27 @@ function ($exception) { /** * Create request for operation 'archive' * - * @param string $object_id (required) * @param string $object_type (required) + * @param string $object_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveRequest($object_id, $object_type, string $contentType = self::contentTypes['archive'][0]) + public function archiveRequest($object_type, $object_id, string $contentType = self::contentTypes['archive'][0]) { - // verify the required parameter 'object_id' is set - if ($object_id === null || (is_array($object_id) && count($object_id) === 0)) { + // 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_id when calling archive' + 'Missing the required parameter $object_type when calling archive' ); } - // verify the required parameter 'object_type' is set - if ($object_type === null || (is_array($object_type) && count($object_type) === 0)) { + // verify the required parameter 'object_id' is set + if ($object_id === null || (is_array($object_id) && count($object_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $object_type when calling archive' + 'Missing the required parameter $object_id when calling archive' ); } @@ -312,18 +312,18 @@ public function archiveRequest($object_id, $object_type, string $contentType = s // path params - if ($object_id !== null) { + if ($object_type !== null) { $resourcePath = str_replace( - '{' . 'objectId' . '}', - ObjectSerializer::toPathValue($object_id), + '{' . 'objectType' . '}', + ObjectSerializer::toPathValue($object_type), $resourcePath ); } // path params - if ($object_type !== null) { + if ($object_id !== null) { $resourcePath = str_replace( - '{' . 'objectType' . '}', - ObjectSerializer::toPathValue($object_type), + '{' . 'objectId' . '}', + ObjectSerializer::toPathValue($object_id), $resourcePath ); } @@ -696,22 +696,22 @@ public function createRequest($object_type, $simple_public_object_input_for_crea * * Read * - * @param string $object_id (required) * @param string $object_type (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) + * @param string $object_id (required) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Model\Error */ - public function getById($object_id, $object_type, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($object_type, $object_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($object_id, $object_type, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($object_type, $object_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -720,22 +720,22 @@ public function getById($object_id, $object_type, $archived = false, $associatio * * Read * - * @param string $object_id (required) * @param string $object_type (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) + * @param string $object_id (required) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($object_id, $object_type, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($object_type, $object_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($object_id, $object_type, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($object_type, $object_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -825,21 +825,21 @@ public function getByIdWithHttpInfo($object_id, $object_type, $archived = false, * * Read * - * @param string $object_id (required) * @param string $object_type (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) + * @param string $object_id (required) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($object_id, $object_type, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($object_type, $object_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($object_id, $object_type, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($object_type, $object_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -852,22 +852,22 @@ function ($response) { * * Read * - * @param string $object_id (required) * @param string $object_type (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) + * @param string $object_id (required) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($object_id, $object_type, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($object_type, $object_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($object_id, $object_type, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($object_type, $object_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -908,32 +908,32 @@ function ($exception) { /** * Create request for operation 'getById' * - * @param string $object_id (required) * @param string $object_type (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) + * @param string $object_id (required) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($object_id, $object_type, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($object_type, $object_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - // verify the required parameter 'object_id' is set - if ($object_id === null || (is_array($object_id) && count($object_id) === 0)) { + // 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_id when calling getById' + 'Missing the required parameter $object_type when calling getById' ); } - // verify the required parameter 'object_type' is set - if ($object_type === null || (is_array($object_type) && count($object_type) === 0)) { + // verify the required parameter 'object_id' is set + if ($object_id === null || (is_array($object_id) && count($object_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $object_type when calling getById' + 'Missing the required parameter $object_id when calling getById' ); } @@ -952,17 +952,17 @@ public function getByIdRequest($object_id, $object_type, $archived = false, $ass // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -970,27 +970,27 @@ public function getByIdRequest($object_id, $object_type, $archived = false, $ass ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -998,18 +998,18 @@ public function getByIdRequest($object_id, $object_type, $archived = false, $ass // path params - if ($object_id !== null) { + if ($object_type !== null) { $resourcePath = str_replace( - '{' . 'objectId' . '}', - ObjectSerializer::toPathValue($object_id), + '{' . 'objectType' . '}', + ObjectSerializer::toPathValue($object_type), $resourcePath ); } // path params - if ($object_type !== null) { + if ($object_id !== null) { $resourcePath = str_replace( - '{' . 'objectType' . '}', - ObjectSerializer::toPathValue($object_type), + '{' . 'objectId' . '}', + ObjectSerializer::toPathValue($object_id), $resourcePath ); } @@ -1078,21 +1078,21 @@ public function getByIdRequest($object_id, $object_type, $archived = false, $ass * List * * @param string $object_type (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Model\Error */ - public function getPage($object_type, $after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($object_type, $limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($object_type, $after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($object_type, $limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1102,21 +1102,21 @@ public function getPage($object_type, $after = null, $archived = false, $associa * List * * @param string $object_type (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($object_type, $after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($object_type, $limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($object_type, $after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($object_type, $limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1207,20 +1207,20 @@ public function getPageWithHttpInfo($object_type, $after = null, $archived = fal * List * * @param string $object_type (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($object_type, $after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($object_type, $limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($object_type, $after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($object_type, $limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1234,21 +1234,21 @@ function ($response) { * List * * @param string $object_type (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($object_type, $after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($object_type, $limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($object_type, $after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($object_type, $limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1290,18 +1290,18 @@ function ($exception) { * Create request for operation 'getPage' * * @param string $object_type (required) - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($object_type, $after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($object_type, $limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { // verify the required parameter 'object_type' is set @@ -1327,26 +1327,26 @@ public function getPageRequest($object_type, $after = null, $archived = false, $ // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1354,17 +1354,17 @@ public function getPageRequest($object_type, $after = null, $archived = false, $ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1372,9 +1372,9 @@ public function getPageRequest($object_type, $after = null, $archived = false, $ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/Api/BatchApi.php b/codegen/Crm/Objects/Api/BatchApi.php index 6d547153..8838eb52 100644 --- a/codegen/Crm/Objects/Api/BatchApi.php +++ b/codegen/Crm/Objects/Api/BatchApi.php @@ -79,15 +79,15 @@ class BatchApi 'create' => [ 'application/json', ], - 'postCrmV3ObjectsObjectTypeBatchUpsert' => [ - 'application/json', - ], 'read' => [ 'application/json', ], 'update' => [ 'application/json', ], + 'upsert' => [ + 'application/json', + ], ]; /** @@ -705,40 +705,42 @@ public function createRequest($object_type, $batch_input_simple_public_object_ba } /** - * Operation postCrmV3ObjectsObjectTypeBatchUpsert + * Operation read * - * Create or update a batch of objects by unique property values + * Read a batch of objects by internal ID, or unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInputUpsert $batch_input_simple_public_object_batch_input_upsert batch_input_simple_public_object_batch_input_upsert (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCrmV3ObjectsObjectTypeBatchUpsert'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id batch_read_input_simple_public_object_id (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject|\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObjectWithErrors|\HubSpot\Client\Crm\Objects\Model\Error + * @return \HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject|\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObjectWithErrors|\HubSpot\Client\Crm\Objects\Model\Error */ - public function postCrmV3ObjectsObjectTypeBatchUpsert($object_type, $batch_input_simple_public_object_batch_input_upsert, string $contentType = self::contentTypes['postCrmV3ObjectsObjectTypeBatchUpsert'][0]) + public function read($object_type, $batch_read_input_simple_public_object_id, $archived = false, string $contentType = self::contentTypes['read'][0]) { - list($response) = $this->postCrmV3ObjectsObjectTypeBatchUpsertWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input_upsert, $contentType); + list($response) = $this->readWithHttpInfo($object_type, $batch_read_input_simple_public_object_id, $archived, $contentType); return $response; } /** - * Operation postCrmV3ObjectsObjectTypeBatchUpsertWithHttpInfo + * Operation readWithHttpInfo * - * Create or update a batch of objects by unique property values + * Read a batch of objects by internal ID, or unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInputUpsert $batch_input_simple_public_object_batch_input_upsert (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCrmV3ObjectsObjectTypeBatchUpsert'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject|\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObjectWithErrors|\HubSpot\Client\Crm\Objects\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject|\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObjectWithErrors|\HubSpot\Client\Crm\Objects\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function postCrmV3ObjectsObjectTypeBatchUpsertWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input_upsert, string $contentType = self::contentTypes['postCrmV3ObjectsObjectTypeBatchUpsert'][0]) + public function readWithHttpInfo($object_type, $batch_read_input_simple_public_object_id, $archived = false, string $contentType = self::contentTypes['read'][0]) { - $request = $this->postCrmV3ObjectsObjectTypeBatchUpsertRequest($object_type, $batch_input_simple_public_object_batch_input_upsert, $contentType); + $request = $this->readRequest($object_type, $batch_read_input_simple_public_object_id, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -766,13 +768,13 @@ public function postCrmV3ObjectsObjectTypeBatchUpsertWithHttpInfo($object_type, switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject', + '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject', $request, $response, ); case 207: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObjectWithErrors', + '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObjectWithErrors', $request, $response, ); @@ -800,7 +802,7 @@ public function postCrmV3ObjectsObjectTypeBatchUpsertWithHttpInfo($object_type, } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject', + '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject', $request, $response, ); @@ -809,7 +811,7 @@ public function postCrmV3ObjectsObjectTypeBatchUpsertWithHttpInfo($object_type, case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject', + '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -817,7 +819,7 @@ public function postCrmV3ObjectsObjectTypeBatchUpsertWithHttpInfo($object_type, case 207: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObjectWithErrors', + '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObjectWithErrors', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -838,20 +840,21 @@ public function postCrmV3ObjectsObjectTypeBatchUpsertWithHttpInfo($object_type, } /** - * Operation postCrmV3ObjectsObjectTypeBatchUpsertAsync + * Operation readAsync * - * Create or update a batch of objects by unique property values + * Read a batch of objects by internal ID, or unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInputUpsert $batch_input_simple_public_object_batch_input_upsert (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCrmV3ObjectsObjectTypeBatchUpsert'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postCrmV3ObjectsObjectTypeBatchUpsertAsync($object_type, $batch_input_simple_public_object_batch_input_upsert, string $contentType = self::contentTypes['postCrmV3ObjectsObjectTypeBatchUpsert'][0]) + public function readAsync($object_type, $batch_read_input_simple_public_object_id, $archived = false, string $contentType = self::contentTypes['read'][0]) { - return $this->postCrmV3ObjectsObjectTypeBatchUpsertAsyncWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input_upsert, $contentType) + return $this->readAsyncWithHttpInfo($object_type, $batch_read_input_simple_public_object_id, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -860,21 +863,22 @@ function ($response) { } /** - * Operation postCrmV3ObjectsObjectTypeBatchUpsertAsyncWithHttpInfo + * Operation readAsyncWithHttpInfo * - * Create or update a batch of objects by unique property values + * Read a batch of objects by internal ID, or unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInputUpsert $batch_input_simple_public_object_batch_input_upsert (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCrmV3ObjectsObjectTypeBatchUpsert'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function postCrmV3ObjectsObjectTypeBatchUpsertAsyncWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input_upsert, string $contentType = self::contentTypes['postCrmV3ObjectsObjectTypeBatchUpsert'][0]) + public function readAsyncWithHttpInfo($object_type, $batch_read_input_simple_public_object_id, $archived = false, string $contentType = self::contentTypes['read'][0]) { - $returnType = '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject'; - $request = $this->postCrmV3ObjectsObjectTypeBatchUpsertRequest($object_type, $batch_input_simple_public_object_batch_input_upsert, $contentType); + $returnType = '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject'; + $request = $this->readRequest($object_type, $batch_read_input_simple_public_object_id, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -913,40 +917,51 @@ function ($exception) { } /** - * Create request for operation 'postCrmV3ObjectsObjectTypeBatchUpsert' + * Create request for operation 'read' * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInputUpsert $batch_input_simple_public_object_batch_input_upsert (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['postCrmV3ObjectsObjectTypeBatchUpsert'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function postCrmV3ObjectsObjectTypeBatchUpsertRequest($object_type, $batch_input_simple_public_object_batch_input_upsert, string $contentType = self::contentTypes['postCrmV3ObjectsObjectTypeBatchUpsert'][0]) + public function readRequest($object_type, $batch_read_input_simple_public_object_id, $archived = false, string $contentType = self::contentTypes['read'][0]) { // 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 postCrmV3ObjectsObjectTypeBatchUpsert' + 'Missing the required parameter $object_type when calling read' ); } - // verify the required parameter 'batch_input_simple_public_object_batch_input_upsert' is set - if ($batch_input_simple_public_object_batch_input_upsert === null || (is_array($batch_input_simple_public_object_batch_input_upsert) && count($batch_input_simple_public_object_batch_input_upsert) === 0)) { + // verify the required parameter 'batch_read_input_simple_public_object_id' is set + if ($batch_read_input_simple_public_object_id === null || (is_array($batch_read_input_simple_public_object_id) && count($batch_read_input_simple_public_object_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $batch_input_simple_public_object_batch_input_upsert when calling postCrmV3ObjectsObjectTypeBatchUpsert' + 'Missing the required parameter $batch_read_input_simple_public_object_id when calling read' ); } - $resourcePath = '/crm/v3/objects/{objectType}/batch/upsert'; + + $resourcePath = '/crm/v3/objects/{objectType}/batch/read'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); // path params @@ -966,12 +981,12 @@ public function postCrmV3ObjectsObjectTypeBatchUpsertRequest($object_type, $batc ); // for model (json/xml) - if (isset($batch_input_simple_public_object_batch_input_upsert)) { + if (isset($batch_read_input_simple_public_object_id)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($batch_input_simple_public_object_batch_input_upsert), JSON_THROW_ON_ERROR); + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($batch_read_input_simple_public_object_id), JSON_THROW_ON_ERROR); } else { - $httpBody = $batch_input_simple_public_object_batch_input_upsert; + $httpBody = $batch_read_input_simple_public_object_id; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -1024,42 +1039,40 @@ public function postCrmV3ObjectsObjectTypeBatchUpsertRequest($object_type, $batc } /** - * Operation read + * Operation update * - * Read a batch of objects by internal ID, or unique property values + * Update a batch of objects by internal ID, or unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id batch_read_input_simple_public_object_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInput $batch_input_simple_public_object_batch_input batch_input_simple_public_object_batch_input (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject|\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObjectWithErrors|\HubSpot\Client\Crm\Objects\Model\Error */ - public function read($object_type, $batch_read_input_simple_public_object_id, $archived = false, string $contentType = self::contentTypes['read'][0]) + public function update($object_type, $batch_input_simple_public_object_batch_input, string $contentType = self::contentTypes['update'][0]) { - list($response) = $this->readWithHttpInfo($object_type, $batch_read_input_simple_public_object_id, $archived, $contentType); + list($response) = $this->updateWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input, $contentType); return $response; } /** - * Operation readWithHttpInfo + * Operation updateWithHttpInfo * - * Read a batch of objects by internal ID, or unique property values + * Update a batch of objects by internal ID, or unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInput $batch_input_simple_public_object_batch_input (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject|\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObjectWithErrors|\HubSpot\Client\Crm\Objects\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function readWithHttpInfo($object_type, $batch_read_input_simple_public_object_id, $archived = false, string $contentType = self::contentTypes['read'][0]) + public function updateWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input, string $contentType = self::contentTypes['update'][0]) { - $request = $this->readRequest($object_type, $batch_read_input_simple_public_object_id, $archived, $contentType); + $request = $this->updateRequest($object_type, $batch_input_simple_public_object_batch_input, $contentType); try { $options = $this->createHttpClientOption(); @@ -1159,21 +1172,20 @@ public function readWithHttpInfo($object_type, $batch_read_input_simple_public_o } /** - * Operation readAsync + * Operation updateAsync * - * Read a batch of objects by internal ID, or unique property values + * Update a batch of objects by internal ID, or unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInput $batch_input_simple_public_object_batch_input (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function readAsync($object_type, $batch_read_input_simple_public_object_id, $archived = false, string $contentType = self::contentTypes['read'][0]) + public function updateAsync($object_type, $batch_input_simple_public_object_batch_input, string $contentType = self::contentTypes['update'][0]) { - return $this->readAsyncWithHttpInfo($object_type, $batch_read_input_simple_public_object_id, $archived, $contentType) + return $this->updateAsyncWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input, $contentType) ->then( function ($response) { return $response[0]; @@ -1182,22 +1194,21 @@ function ($response) { } /** - * Operation readAsyncWithHttpInfo + * Operation updateAsyncWithHttpInfo * - * Read a batch of objects by internal ID, or unique property values + * Update a batch of objects by internal ID, or unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInput $batch_input_simple_public_object_batch_input (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function readAsyncWithHttpInfo($object_type, $batch_read_input_simple_public_object_id, $archived = false, string $contentType = self::contentTypes['read'][0]) + public function updateAsyncWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input, string $contentType = self::contentTypes['update'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject'; - $request = $this->readRequest($object_type, $batch_read_input_simple_public_object_id, $archived, $contentType); + $request = $this->updateRequest($object_type, $batch_input_simple_public_object_batch_input, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1236,51 +1247,40 @@ function ($exception) { } /** - * Create request for operation 'read' + * Create request for operation 'update' * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchReadInputSimplePublicObjectId $batch_read_input_simple_public_object_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInput $batch_input_simple_public_object_batch_input (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function readRequest($object_type, $batch_read_input_simple_public_object_id, $archived = false, string $contentType = self::contentTypes['read'][0]) + public function updateRequest($object_type, $batch_input_simple_public_object_batch_input, string $contentType = self::contentTypes['update'][0]) { // 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 read' + 'Missing the required parameter $object_type when calling update' ); } - // verify the required parameter 'batch_read_input_simple_public_object_id' is set - if ($batch_read_input_simple_public_object_id === null || (is_array($batch_read_input_simple_public_object_id) && count($batch_read_input_simple_public_object_id) === 0)) { + // verify the required parameter 'batch_input_simple_public_object_batch_input' is set + if ($batch_input_simple_public_object_batch_input === null || (is_array($batch_input_simple_public_object_batch_input) && count($batch_input_simple_public_object_batch_input) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $batch_read_input_simple_public_object_id when calling read' + 'Missing the required parameter $batch_input_simple_public_object_batch_input when calling update' ); } - - $resourcePath = '/crm/v3/objects/{objectType}/batch/read'; + $resourcePath = '/crm/v3/objects/{objectType}/batch/update'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // path params @@ -1300,12 +1300,12 @@ public function readRequest($object_type, $batch_read_input_simple_public_object ); // for model (json/xml) - if (isset($batch_read_input_simple_public_object_id)) { + if (isset($batch_input_simple_public_object_batch_input)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($batch_read_input_simple_public_object_id), JSON_THROW_ON_ERROR); + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($batch_input_simple_public_object_batch_input), JSON_THROW_ON_ERROR); } else { - $httpBody = $batch_read_input_simple_public_object_id; + $httpBody = $batch_input_simple_public_object_batch_input; } } elseif (count($formParams) > 0) { if ($multipart) { @@ -1358,40 +1358,40 @@ public function readRequest($object_type, $batch_read_input_simple_public_object } /** - * Operation update + * Operation upsert * - * Update a batch of objects by internal ID, or unique property values + * Create or update a batch of objects by unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInput $batch_input_simple_public_object_batch_input batch_input_simple_public_object_batch_input (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInputUpsert $batch_input_simple_public_object_batch_input_upsert batch_input_simple_public_object_batch_input_upsert (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsert'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject|\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObjectWithErrors|\HubSpot\Client\Crm\Objects\Model\Error + * @return \HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject|\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObjectWithErrors|\HubSpot\Client\Crm\Objects\Model\Error */ - public function update($object_type, $batch_input_simple_public_object_batch_input, string $contentType = self::contentTypes['update'][0]) + public function upsert($object_type, $batch_input_simple_public_object_batch_input_upsert, string $contentType = self::contentTypes['upsert'][0]) { - list($response) = $this->updateWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input, $contentType); + list($response) = $this->upsertWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input_upsert, $contentType); return $response; } /** - * Operation updateWithHttpInfo + * Operation upsertWithHttpInfo * - * Update a batch of objects by internal ID, or unique property values + * Create or update a batch of objects by unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInput $batch_input_simple_public_object_batch_input (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInputUpsert $batch_input_simple_public_object_batch_input_upsert (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsert'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject|\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObjectWithErrors|\HubSpot\Client\Crm\Objects\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject|\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObjectWithErrors|\HubSpot\Client\Crm\Objects\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input, string $contentType = self::contentTypes['update'][0]) + public function upsertWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input_upsert, string $contentType = self::contentTypes['upsert'][0]) { - $request = $this->updateRequest($object_type, $batch_input_simple_public_object_batch_input, $contentType); + $request = $this->upsertRequest($object_type, $batch_input_simple_public_object_batch_input_upsert, $contentType); try { $options = $this->createHttpClientOption(); @@ -1419,13 +1419,13 @@ public function updateWithHttpInfo($object_type, $batch_input_simple_public_obje switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject', + '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject', $request, $response, ); case 207: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObjectWithErrors', + '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObjectWithErrors', $request, $response, ); @@ -1453,7 +1453,7 @@ public function updateWithHttpInfo($object_type, $batch_input_simple_public_obje } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject', + '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject', $request, $response, ); @@ -1462,7 +1462,7 @@ public function updateWithHttpInfo($object_type, $batch_input_simple_public_obje case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject', + '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1470,7 +1470,7 @@ public function updateWithHttpInfo($object_type, $batch_input_simple_public_obje case 207: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObjectWithErrors', + '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObjectWithErrors', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1491,20 +1491,20 @@ public function updateWithHttpInfo($object_type, $batch_input_simple_public_obje } /** - * Operation updateAsync + * Operation upsertAsync * - * Update a batch of objects by internal ID, or unique property values + * Create or update a batch of objects by unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInput $batch_input_simple_public_object_batch_input (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInputUpsert $batch_input_simple_public_object_batch_input_upsert (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsert'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsync($object_type, $batch_input_simple_public_object_batch_input, string $contentType = self::contentTypes['update'][0]) + public function upsertAsync($object_type, $batch_input_simple_public_object_batch_input_upsert, string $contentType = self::contentTypes['upsert'][0]) { - return $this->updateAsyncWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input, $contentType) + return $this->upsertAsyncWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input_upsert, $contentType) ->then( function ($response) { return $response[0]; @@ -1513,21 +1513,21 @@ function ($response) { } /** - * Operation updateAsyncWithHttpInfo + * Operation upsertAsyncWithHttpInfo * - * Update a batch of objects by internal ID, or unique property values + * Create or update a batch of objects by unique property values * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInput $batch_input_simple_public_object_batch_input (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInputUpsert $batch_input_simple_public_object_batch_input_upsert (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsert'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsyncWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input, string $contentType = self::contentTypes['update'][0]) + public function upsertAsyncWithHttpInfo($object_type, $batch_input_simple_public_object_batch_input_upsert, string $contentType = self::contentTypes['upsert'][0]) { - $returnType = '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicObject'; - $request = $this->updateRequest($object_type, $batch_input_simple_public_object_batch_input, $contentType); + $returnType = '\HubSpot\Client\Crm\Objects\Model\BatchResponseSimplePublicUpsertObject'; + $request = $this->upsertRequest($object_type, $batch_input_simple_public_object_batch_input_upsert, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1566,34 +1566,34 @@ function ($exception) { } /** - * Create request for operation 'update' + * Create request for operation 'upsert' * * @param string $object_type (required) - * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInput $batch_input_simple_public_object_batch_input (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation + * @param \HubSpot\Client\Crm\Objects\Model\BatchInputSimplePublicObjectBatchInputUpsert $batch_input_simple_public_object_batch_input_upsert (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsert'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateRequest($object_type, $batch_input_simple_public_object_batch_input, string $contentType = self::contentTypes['update'][0]) + public function upsertRequest($object_type, $batch_input_simple_public_object_batch_input_upsert, string $contentType = self::contentTypes['upsert'][0]) { // 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 update' + 'Missing the required parameter $object_type when calling upsert' ); } - // verify the required parameter 'batch_input_simple_public_object_batch_input' is set - if ($batch_input_simple_public_object_batch_input === null || (is_array($batch_input_simple_public_object_batch_input) && count($batch_input_simple_public_object_batch_input) === 0)) { + // verify the required parameter 'batch_input_simple_public_object_batch_input_upsert' is set + if ($batch_input_simple_public_object_batch_input_upsert === null || (is_array($batch_input_simple_public_object_batch_input_upsert) && count($batch_input_simple_public_object_batch_input_upsert) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $batch_input_simple_public_object_batch_input when calling update' + 'Missing the required parameter $batch_input_simple_public_object_batch_input_upsert when calling upsert' ); } - $resourcePath = '/crm/v3/objects/{objectType}/batch/update'; + $resourcePath = '/crm/v3/objects/{objectType}/batch/upsert'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1619,12 +1619,12 @@ public function updateRequest($object_type, $batch_input_simple_public_object_ba ); // for model (json/xml) - if (isset($batch_input_simple_public_object_batch_input)) { + if (isset($batch_input_simple_public_object_batch_input_upsert)) { if (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($batch_input_simple_public_object_batch_input), JSON_THROW_ON_ERROR); + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($batch_input_simple_public_object_batch_input_upsert), JSON_THROW_ON_ERROR); } else { - $httpBody = $batch_input_simple_public_object_batch_input; + $httpBody = $batch_input_simple_public_object_batch_input_upsert; } } elseif (count($formParams) > 0) { if ($multipart) { diff --git a/codegen/Crm/Objects/Calls/Api/BasicApi.php b/codegen/Crm/Objects/Calls/Api/BasicApi.php index f22182f7..8f634749 100644 --- a/codegen/Crm/Objects/Calls/Api/BasicApi.php +++ b/codegen/Crm/Objects/Calls/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $call_id call_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Calls\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Calls\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Calls\Model\Error */ - public function getById($call_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($call_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($call_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($call_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($call_id, $archived = false, $associations = null, $id_p * Read * * @param string $call_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Calls\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Calls\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Calls\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($call_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($call_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($call_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($call_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($call_id, $archived = false, $associations = * Read * * @param string $call_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($call_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($call_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($call_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($call_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $call_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($call_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($call_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Calls\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($call_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($call_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $call_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($call_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($call_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'call_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($call_id, $archived = false, $associations = null // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($call_id, $archived = false, $associations = null ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($call_id, $archived = false, $associations = null * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Calls\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Calls\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Calls\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Calls\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Calls\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Calls\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Calls\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/Communications/Api/BasicApi.php b/codegen/Crm/Objects/Communications/Api/BasicApi.php index 2054c503..1e19d429 100644 --- a/codegen/Crm/Objects/Communications/Api/BasicApi.php +++ b/codegen/Crm/Objects/Communications/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $communication_id communication_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Communications\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Communications\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Communications\Model\Error */ - public function getById($communication_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($communication_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($communication_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($communication_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($communication_id, $archived = false, $associations = nu * Read * * @param string $communication_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Communications\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Communications\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Communications\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($communication_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($communication_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($communication_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($communication_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($communication_id, $archived = false, $assoc * Read * * @param string $communication_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($communication_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($communication_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($communication_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($communication_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $communication_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($communication_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($communication_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Communications\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($communication_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($communication_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $communication_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($communication_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($communication_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'communication_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($communication_id, $archived = false, $associatio // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($communication_id, $archived = false, $associatio ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($communication_id, $archived = false, $associatio * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of communications that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Communications\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Communications\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Communications\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of communications that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Communications\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Communications\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Communications\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of communications that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of communications that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Communications\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of communications that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/DealSplits/Api/BatchApi.php b/codegen/Crm/Objects/DealSplits/Api/BatchApi.php index c0ca7593..d1030a9c 100644 --- a/codegen/Crm/Objects/DealSplits/Api/BatchApi.php +++ b/codegen/Crm/Objects/DealSplits/Api/BatchApi.php @@ -73,10 +73,10 @@ class BatchApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmObjectsV3DealsSplitsBatchRead' => [ + 'read' => [ 'application/json', ], - 'crmObjectsV3DealsSplitsBatchUpsert' => [ + 'upsert' => [ 'application/json', ], ]; @@ -128,38 +128,38 @@ public function getConfig() } /** - * Operation crmObjectsV3DealsSplitsBatchRead + * Operation read * * Read a batch of deal split objects by their associated deal object internal ID * * @param \HubSpot\Client\Crm\Objects\DealSplits\Model\BatchInputPublicObjectId $batch_input_public_object_id batch_input_public_object_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectsV3DealsSplitsBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\DealSplits\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\DealSplits\Model\BatchResponseDealToDealSplits|\HubSpot\Client\Crm\Objects\DealSplits\Model\BatchResponseDealToDealSplitsWithErrors|\HubSpot\Client\Crm\Objects\DealSplits\Model\Error */ - public function crmObjectsV3DealsSplitsBatchRead($batch_input_public_object_id, string $contentType = self::contentTypes['crmObjectsV3DealsSplitsBatchRead'][0]) + public function read($batch_input_public_object_id, string $contentType = self::contentTypes['read'][0]) { - list($response) = $this->crmObjectsV3DealsSplitsBatchReadWithHttpInfo($batch_input_public_object_id, $contentType); + list($response) = $this->readWithHttpInfo($batch_input_public_object_id, $contentType); return $response; } /** - * Operation crmObjectsV3DealsSplitsBatchReadWithHttpInfo + * Operation readWithHttpInfo * * Read a batch of deal split objects by their associated deal object internal ID * * @param \HubSpot\Client\Crm\Objects\DealSplits\Model\BatchInputPublicObjectId $batch_input_public_object_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectsV3DealsSplitsBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\DealSplits\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\DealSplits\Model\BatchResponseDealToDealSplits|\HubSpot\Client\Crm\Objects\DealSplits\Model\BatchResponseDealToDealSplitsWithErrors|\HubSpot\Client\Crm\Objects\DealSplits\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmObjectsV3DealsSplitsBatchReadWithHttpInfo($batch_input_public_object_id, string $contentType = self::contentTypes['crmObjectsV3DealsSplitsBatchRead'][0]) + public function readWithHttpInfo($batch_input_public_object_id, string $contentType = self::contentTypes['read'][0]) { - $request = $this->crmObjectsV3DealsSplitsBatchReadRequest($batch_input_public_object_id, $contentType); + $request = $this->readRequest($batch_input_public_object_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -259,19 +259,19 @@ public function crmObjectsV3DealsSplitsBatchReadWithHttpInfo($batch_input_public } /** - * Operation crmObjectsV3DealsSplitsBatchReadAsync + * Operation readAsync * * Read a batch of deal split objects by their associated deal object internal ID * * @param \HubSpot\Client\Crm\Objects\DealSplits\Model\BatchInputPublicObjectId $batch_input_public_object_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectsV3DealsSplitsBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmObjectsV3DealsSplitsBatchReadAsync($batch_input_public_object_id, string $contentType = self::contentTypes['crmObjectsV3DealsSplitsBatchRead'][0]) + public function readAsync($batch_input_public_object_id, string $contentType = self::contentTypes['read'][0]) { - return $this->crmObjectsV3DealsSplitsBatchReadAsyncWithHttpInfo($batch_input_public_object_id, $contentType) + return $this->readAsyncWithHttpInfo($batch_input_public_object_id, $contentType) ->then( function ($response) { return $response[0]; @@ -280,20 +280,20 @@ function ($response) { } /** - * Operation crmObjectsV3DealsSplitsBatchReadAsyncWithHttpInfo + * Operation readAsyncWithHttpInfo * * Read a batch of deal split objects by their associated deal object internal ID * * @param \HubSpot\Client\Crm\Objects\DealSplits\Model\BatchInputPublicObjectId $batch_input_public_object_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectsV3DealsSplitsBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmObjectsV3DealsSplitsBatchReadAsyncWithHttpInfo($batch_input_public_object_id, string $contentType = self::contentTypes['crmObjectsV3DealsSplitsBatchRead'][0]) + public function readAsyncWithHttpInfo($batch_input_public_object_id, string $contentType = self::contentTypes['read'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\DealSplits\Model\BatchResponseDealToDealSplits'; - $request = $this->crmObjectsV3DealsSplitsBatchReadRequest($batch_input_public_object_id, $contentType); + $request = $this->readRequest($batch_input_public_object_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -332,21 +332,21 @@ function ($exception) { } /** - * Create request for operation 'crmObjectsV3DealsSplitsBatchRead' + * Create request for operation 'read' * * @param \HubSpot\Client\Crm\Objects\DealSplits\Model\BatchInputPublicObjectId $batch_input_public_object_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectsV3DealsSplitsBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmObjectsV3DealsSplitsBatchReadRequest($batch_input_public_object_id, string $contentType = self::contentTypes['crmObjectsV3DealsSplitsBatchRead'][0]) + public function readRequest($batch_input_public_object_id, string $contentType = self::contentTypes['read'][0]) { // verify the required parameter 'batch_input_public_object_id' is set if ($batch_input_public_object_id === null || (is_array($batch_input_public_object_id) && count($batch_input_public_object_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $batch_input_public_object_id when calling crmObjectsV3DealsSplitsBatchRead' + 'Missing the required parameter $batch_input_public_object_id when calling read' ); } @@ -427,38 +427,38 @@ public function crmObjectsV3DealsSplitsBatchReadRequest($batch_input_public_obje } /** - * Operation crmObjectsV3DealsSplitsBatchUpsert + * Operation upsert * * Create or replace deal splits for deals with the provided IDs. Deal split percentages for each deal must sum up to 1.0 (100%) and may have up to 8 decimal places * * @param \HubSpot\Client\Crm\Objects\DealSplits\Model\PublicDealSplitsBatchCreateRequest $public_deal_splits_batch_create_request public_deal_splits_batch_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectsV3DealsSplitsBatchUpsert'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsert'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\DealSplits\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\DealSplits\Model\BatchResponseDealToDealSplits|\HubSpot\Client\Crm\Objects\DealSplits\Model\BatchResponseDealToDealSplitsWithErrors|\HubSpot\Client\Crm\Objects\DealSplits\Model\Error */ - public function crmObjectsV3DealsSplitsBatchUpsert($public_deal_splits_batch_create_request, string $contentType = self::contentTypes['crmObjectsV3DealsSplitsBatchUpsert'][0]) + public function upsert($public_deal_splits_batch_create_request, string $contentType = self::contentTypes['upsert'][0]) { - list($response) = $this->crmObjectsV3DealsSplitsBatchUpsertWithHttpInfo($public_deal_splits_batch_create_request, $contentType); + list($response) = $this->upsertWithHttpInfo($public_deal_splits_batch_create_request, $contentType); return $response; } /** - * Operation crmObjectsV3DealsSplitsBatchUpsertWithHttpInfo + * Operation upsertWithHttpInfo * * Create or replace deal splits for deals with the provided IDs. Deal split percentages for each deal must sum up to 1.0 (100%) and may have up to 8 decimal places * * @param \HubSpot\Client\Crm\Objects\DealSplits\Model\PublicDealSplitsBatchCreateRequest $public_deal_splits_batch_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectsV3DealsSplitsBatchUpsert'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsert'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\DealSplits\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\DealSplits\Model\BatchResponseDealToDealSplits|\HubSpot\Client\Crm\Objects\DealSplits\Model\BatchResponseDealToDealSplitsWithErrors|\HubSpot\Client\Crm\Objects\DealSplits\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmObjectsV3DealsSplitsBatchUpsertWithHttpInfo($public_deal_splits_batch_create_request, string $contentType = self::contentTypes['crmObjectsV3DealsSplitsBatchUpsert'][0]) + public function upsertWithHttpInfo($public_deal_splits_batch_create_request, string $contentType = self::contentTypes['upsert'][0]) { - $request = $this->crmObjectsV3DealsSplitsBatchUpsertRequest($public_deal_splits_batch_create_request, $contentType); + $request = $this->upsertRequest($public_deal_splits_batch_create_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -558,19 +558,19 @@ public function crmObjectsV3DealsSplitsBatchUpsertWithHttpInfo($public_deal_spli } /** - * Operation crmObjectsV3DealsSplitsBatchUpsertAsync + * Operation upsertAsync * * Create or replace deal splits for deals with the provided IDs. Deal split percentages for each deal must sum up to 1.0 (100%) and may have up to 8 decimal places * * @param \HubSpot\Client\Crm\Objects\DealSplits\Model\PublicDealSplitsBatchCreateRequest $public_deal_splits_batch_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectsV3DealsSplitsBatchUpsert'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsert'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmObjectsV3DealsSplitsBatchUpsertAsync($public_deal_splits_batch_create_request, string $contentType = self::contentTypes['crmObjectsV3DealsSplitsBatchUpsert'][0]) + public function upsertAsync($public_deal_splits_batch_create_request, string $contentType = self::contentTypes['upsert'][0]) { - return $this->crmObjectsV3DealsSplitsBatchUpsertAsyncWithHttpInfo($public_deal_splits_batch_create_request, $contentType) + return $this->upsertAsyncWithHttpInfo($public_deal_splits_batch_create_request, $contentType) ->then( function ($response) { return $response[0]; @@ -579,20 +579,20 @@ function ($response) { } /** - * Operation crmObjectsV3DealsSplitsBatchUpsertAsyncWithHttpInfo + * Operation upsertAsyncWithHttpInfo * * Create or replace deal splits for deals with the provided IDs. Deal split percentages for each deal must sum up to 1.0 (100%) and may have up to 8 decimal places * * @param \HubSpot\Client\Crm\Objects\DealSplits\Model\PublicDealSplitsBatchCreateRequest $public_deal_splits_batch_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectsV3DealsSplitsBatchUpsert'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsert'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmObjectsV3DealsSplitsBatchUpsertAsyncWithHttpInfo($public_deal_splits_batch_create_request, string $contentType = self::contentTypes['crmObjectsV3DealsSplitsBatchUpsert'][0]) + public function upsertAsyncWithHttpInfo($public_deal_splits_batch_create_request, string $contentType = self::contentTypes['upsert'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\DealSplits\Model\BatchResponseDealToDealSplits'; - $request = $this->crmObjectsV3DealsSplitsBatchUpsertRequest($public_deal_splits_batch_create_request, $contentType); + $request = $this->upsertRequest($public_deal_splits_batch_create_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -631,21 +631,21 @@ function ($exception) { } /** - * Create request for operation 'crmObjectsV3DealsSplitsBatchUpsert' + * Create request for operation 'upsert' * * @param \HubSpot\Client\Crm\Objects\DealSplits\Model\PublicDealSplitsBatchCreateRequest $public_deal_splits_batch_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectsV3DealsSplitsBatchUpsert'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['upsert'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmObjectsV3DealsSplitsBatchUpsertRequest($public_deal_splits_batch_create_request, string $contentType = self::contentTypes['crmObjectsV3DealsSplitsBatchUpsert'][0]) + public function upsertRequest($public_deal_splits_batch_create_request, string $contentType = self::contentTypes['upsert'][0]) { // verify the required parameter 'public_deal_splits_batch_create_request' is set if ($public_deal_splits_batch_create_request === null || (is_array($public_deal_splits_batch_create_request) && count($public_deal_splits_batch_create_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $public_deal_splits_batch_create_request when calling crmObjectsV3DealsSplitsBatchUpsert' + 'Missing the required parameter $public_deal_splits_batch_create_request when calling upsert' ); } diff --git a/codegen/Crm/Objects/Emails/Api/BasicApi.php b/codegen/Crm/Objects/Emails/Api/BasicApi.php index fc91fbe1..5f6f9123 100644 --- a/codegen/Crm/Objects/Emails/Api/BasicApi.php +++ b/codegen/Crm/Objects/Emails/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $email_id email_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Emails\Model\Error */ - public function getById($email_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($email_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($email_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($email_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($email_id, $archived = false, $associations = null, $id_ * Read * * @param string $email_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($email_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($email_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($email_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($email_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($email_id, $archived = false, $associations * Read * * @param string $email_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($email_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($email_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($email_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($email_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $email_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($email_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($email_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Emails\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($email_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($email_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $email_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($email_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($email_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'email_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($email_id, $archived = false, $associations = nul // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($email_id, $archived = false, $associations = nul ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($email_id, $archived = false, $associations = nul * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Emails\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Emails\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Emails\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Emails\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php b/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php index de4ed497..fdb0f811 100644 --- a/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php +++ b/codegen/Crm/Objects/FeedbackSubmissions/Api/BasicApi.php @@ -133,20 +133,20 @@ public function getConfig() * Read * * @param string $feedback_submission_id feedback_submission_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\FeedbackSubmissions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\Error */ - public function getById($feedback_submission_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($feedback_submission_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($feedback_submission_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($feedback_submission_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -156,20 +156,20 @@ public function getById($feedback_submission_id, $archived = false, $association * Read * * @param string $feedback_submission_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\FeedbackSubmissions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($feedback_submission_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($feedback_submission_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($feedback_submission_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($feedback_submission_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -260,19 +260,19 @@ public function getByIdWithHttpInfo($feedback_submission_id, $archived = false, * Read * * @param string $feedback_submission_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($feedback_submission_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($feedback_submission_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($feedback_submission_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($feedback_submission_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -286,20 +286,20 @@ function ($response) { * Read * * @param string $feedback_submission_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($feedback_submission_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($feedback_submission_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($feedback_submission_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($feedback_submission_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -341,17 +341,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $feedback_submission_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($feedback_submission_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($feedback_submission_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'feedback_submission_id' is set @@ -379,17 +379,17 @@ public function getByIdRequest($feedback_submission_id, $archived = false, $asso // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -397,27 +397,27 @@ public function getByIdRequest($feedback_submission_id, $archived = false, $asso ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -496,21 +496,21 @@ public function getByIdRequest($feedback_submission_id, $archived = false, $asso * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of feedback submissions that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\FeedbackSubmissions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -519,21 +519,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of feedback submissions that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\FeedbackSubmissions\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -623,20 +623,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of feedback submissions that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -649,21 +649,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of feedback submissions that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\FeedbackSubmissions\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -704,18 +704,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of feedback submissions that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -734,26 +734,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -761,17 +761,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -779,9 +779,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/Goals/Api/BasicApi.php b/codegen/Crm/Objects/Goals/Api/BasicApi.php index 128721e5..3bdb72a2 100644 --- a/codegen/Crm/Objects/Goals/Api/BasicApi.php +++ b/codegen/Crm/Objects/Goals/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Retrieve a goal target * * @param string $goal_target_id goal_target_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Goals\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Goals\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Goals\Model\Error */ - public function getById($goal_target_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($goal_target_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($goal_target_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($goal_target_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($goal_target_id, $archived = false, $associations = null * Retrieve a goal target * * @param string $goal_target_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Goals\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Goals\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Goals\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($goal_target_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($goal_target_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($goal_target_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($goal_target_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($goal_target_id, $archived = false, $associa * Retrieve a goal target * * @param string $goal_target_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($goal_target_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($goal_target_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($goal_target_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($goal_target_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Retrieve a goal target * * @param string $goal_target_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($goal_target_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($goal_target_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Goals\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($goal_target_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($goal_target_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $goal_target_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($goal_target_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($goal_target_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'goal_target_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($goal_target_id, $archived = false, $associations // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($goal_target_id, $archived = false, $associations ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($goal_target_id, $archived = false, $associations * * Retrieve goal targets * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of goal targets that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Goals\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Goals\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Goals\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * Retrieve goal targets * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of goal targets that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Goals\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Goals\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Goals\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * Retrieve goal targets * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of goal targets that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * Retrieve goal targets * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of goal targets that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Goals\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of goal targets that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/Leads/Api/BasicApi.php b/codegen/Crm/Objects/Leads/Api/BasicApi.php index 2c4da7d0..197880c9 100644 --- a/codegen/Crm/Objects/Leads/Api/BasicApi.php +++ b/codegen/Crm/Objects/Leads/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $leads_id leads_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Leads\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Leads\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Leads\Model\Error */ - public function getById($leads_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($leads_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($leads_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($leads_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($leads_id, $archived = false, $associations = null, $id_ * Read * * @param string $leads_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Leads\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Leads\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Leads\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($leads_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($leads_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($leads_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($leads_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($leads_id, $archived = false, $associations * Read * * @param string $leads_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($leads_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($leads_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($leads_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($leads_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $leads_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($leads_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($leads_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Leads\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($leads_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($leads_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $leads_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($leads_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($leads_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'leads_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($leads_id, $archived = false, $associations = nul // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($leads_id, $archived = false, $associations = nul ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($leads_id, $archived = false, $associations = nul * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Leads\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Leads\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Leads\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Leads\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Leads\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Leads\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Leads\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/Meetings/Api/BasicApi.php b/codegen/Crm/Objects/Meetings/Api/BasicApi.php index 2d33fe79..48bb9c92 100644 --- a/codegen/Crm/Objects/Meetings/Api/BasicApi.php +++ b/codegen/Crm/Objects/Meetings/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $meeting_id meeting_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Meetings\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Meetings\Model\Error */ - public function getById($meeting_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($meeting_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($meeting_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($meeting_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($meeting_id, $archived = false, $associations = null, $i * Read * * @param string $meeting_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Meetings\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Meetings\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($meeting_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($meeting_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($meeting_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($meeting_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($meeting_id, $archived = false, $association * Read * * @param string $meeting_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($meeting_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($meeting_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($meeting_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($meeting_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $meeting_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($meeting_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($meeting_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Meetings\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($meeting_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($meeting_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $meeting_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($meeting_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($meeting_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'meeting_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($meeting_id, $archived = false, $associations = n // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($meeting_id, $archived = false, $associations = n ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($meeting_id, $archived = false, $associations = n * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of meetings that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Meetings\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Meetings\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Meetings\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of meetings that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Meetings\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Meetings\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Meetings\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of meetings that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of meetings that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Meetings\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of meetings that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/Notes/Api/BasicApi.php b/codegen/Crm/Objects/Notes/Api/BasicApi.php index ebc0118b..9971eab8 100644 --- a/codegen/Crm/Objects/Notes/Api/BasicApi.php +++ b/codegen/Crm/Objects/Notes/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $note_id note_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Notes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Notes\Model\Error */ - public function getById($note_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($note_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($note_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($note_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($note_id, $archived = false, $associations = null, $id_p * Read * * @param string $note_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Notes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Notes\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($note_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($note_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($note_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($note_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($note_id, $archived = false, $associations = * Read * * @param string $note_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($note_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($note_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($note_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($note_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $note_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($note_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($note_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Notes\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($note_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($note_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $note_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($note_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($note_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'note_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($note_id, $archived = false, $associations = null // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($note_id, $archived = false, $associations = null ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($note_id, $archived = false, $associations = null * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Notes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Notes\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Notes\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Notes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Notes\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Notes\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Notes\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/PostalMail/Api/BasicApi.php b/codegen/Crm/Objects/PostalMail/Api/BasicApi.php index e080c9e6..e569dfc1 100644 --- a/codegen/Crm/Objects/PostalMail/Api/BasicApi.php +++ b/codegen/Crm/Objects/PostalMail/Api/BasicApi.php @@ -642,20 +642,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Operation getById * * @param string $postal_mail_id postal_mail_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\PostalMail\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\PostalMail\Model\Error */ - public function getById($postal_mail_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($postal_mail_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($postal_mail_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($postal_mail_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -663,20 +663,20 @@ public function getById($postal_mail_id, $archived = false, $associations = null * Operation getByIdWithHttpInfo * * @param string $postal_mail_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\PostalMail\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\PostalMail\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($postal_mail_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($postal_mail_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($postal_mail_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($postal_mail_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -765,19 +765,19 @@ public function getByIdWithHttpInfo($postal_mail_id, $archived = false, $associa * Operation getByIdAsync * * @param string $postal_mail_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($postal_mail_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($postal_mail_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($postal_mail_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($postal_mail_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -789,20 +789,20 @@ function ($response) { * Operation getByIdAsyncWithHttpInfo * * @param string $postal_mail_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($postal_mail_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($postal_mail_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\PostalMail\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($postal_mail_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($postal_mail_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -844,17 +844,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $postal_mail_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($postal_mail_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($postal_mail_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'postal_mail_id' is set @@ -882,17 +882,17 @@ public function getByIdRequest($postal_mail_id, $archived = false, $associations // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -900,27 +900,27 @@ public function getByIdRequest($postal_mail_id, $archived = false, $associations ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -997,42 +997,42 @@ public function getByIdRequest($postal_mail_id, $archived = false, $associations /** * Operation getPage * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\PostalMail\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\PostalMail\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\PostalMail\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } /** * Operation getPageWithHttpInfo * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\PostalMail\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\PostalMail\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\PostalMail\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1120,20 +1120,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati /** * Operation getPageAsync * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1144,21 +1144,21 @@ function ($response) { /** * Operation getPageAsyncWithHttpInfo * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\PostalMail\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1199,18 +1199,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1229,26 +1229,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1256,17 +1256,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1274,9 +1274,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/Tasks/Api/BasicApi.php b/codegen/Crm/Objects/Tasks/Api/BasicApi.php index 457ac6a4..94f675ee 100644 --- a/codegen/Crm/Objects/Tasks/Api/BasicApi.php +++ b/codegen/Crm/Objects/Tasks/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $task_id task_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Tasks\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Tasks\Model\Error */ - public function getById($task_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($task_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($task_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($task_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($task_id, $archived = false, $associations = null, $id_p * Read * * @param string $task_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Tasks\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Tasks\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($task_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($task_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($task_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($task_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($task_id, $archived = false, $associations = * Read * * @param string $task_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($task_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($task_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($task_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($task_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $task_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($task_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($task_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Tasks\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($task_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($task_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $task_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($task_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($task_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'task_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($task_id, $archived = false, $associations = null // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($task_id, $archived = false, $associations = null ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($task_id, $archived = false, $associations = null * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Tasks\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Tasks\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Tasks\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Tasks\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Tasks\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Tasks\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Tasks\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Objects/Taxes/Api/BasicApi.php b/codegen/Crm/Objects/Taxes/Api/BasicApi.php index f3b118f8..8e4f74c3 100644 --- a/codegen/Crm/Objects/Taxes/Api/BasicApi.php +++ b/codegen/Crm/Objects/Taxes/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $tax_id tax_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Taxes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Taxes\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Taxes\Model\Error */ - public function getById($tax_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($tax_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($tax_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($tax_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($tax_id, $archived = false, $associations = null, $id_pr * Read * * @param string $tax_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Taxes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Taxes\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Objects\Taxes\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($tax_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($tax_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($tax_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($tax_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($tax_id, $archived = false, $associations = * Read * * @param string $tax_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($tax_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($tax_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($tax_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($tax_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $tax_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($tax_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($tax_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Taxes\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($tax_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($tax_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $tax_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($tax_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($tax_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'tax_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($tax_id, $archived = false, $associations = null, // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($tax_id, $archived = false, $associations = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($tax_id, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Taxes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Objects\Taxes\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Taxes\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Objects\Taxes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Objects\Taxes\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Objects\Taxes\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Objects\Taxes\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Owners/Api/BasicApi.php b/codegen/Crm/Owners/Api/BasicApi.php index 05c18237..85195601 100644 --- a/codegen/Crm/Owners/Api/BasicApi.php +++ b/codegen/Crm/Owners/Api/BasicApi.php @@ -73,10 +73,10 @@ class BasicApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmV3Owners' => [ + 'getById' => [ 'application/json', ], - 'getById' => [ + 'getPage' => [ 'application/json', ], ]; @@ -128,40 +128,42 @@ public function getConfig() } /** - * Operation crmV3Owners + * Operation getById * - * @param string|null $after after (optional) - * @param bool|null $archived archived (optional, default to false) - * @param string|null $email email (optional) - * @param int|null $limit limit (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Owners'] to see the possible values for this operation + * Retrieve a specific owner by ID + * + * @param int $owner_id (required) + * @param string|null $id_property (optional, default to 'id') + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Owners\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging|\HubSpot\Client\Crm\Owners\Model\Error + * @return \HubSpot\Client\Crm\Owners\Model\PublicOwner|\HubSpot\Client\Crm\Owners\Model\Error */ - public function crmV3Owners($after = null, $archived = false, $email = null, $limit = 100, string $contentType = self::contentTypes['crmV3Owners'][0]) + public function getById($owner_id, $id_property = 'id', $archived = false, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->crmV3OwnersWithHttpInfo($after, $archived, $email, $limit, $contentType); + list($response) = $this->getByIdWithHttpInfo($owner_id, $id_property, $archived, $contentType); return $response; } /** - * Operation crmV3OwnersWithHttpInfo + * Operation getByIdWithHttpInfo * - * @param string|null $after (optional) - * @param bool|null $archived (optional, default to false) - * @param string|null $email (optional) - * @param int|null $limit (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Owners'] to see the possible values for this operation + * Retrieve a specific owner by ID + * + * @param int $owner_id (required) + * @param string|null $id_property (optional, default to 'id') + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Owners\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging|\HubSpot\Client\Crm\Owners\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Owners\Model\PublicOwner|\HubSpot\Client\Crm\Owners\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmV3OwnersWithHttpInfo($after = null, $archived = false, $email = null, $limit = 100, string $contentType = self::contentTypes['crmV3Owners'][0]) + public function getByIdWithHttpInfo($owner_id, $id_property = 'id', $archived = false, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->crmV3OwnersRequest($after, $archived, $email, $limit, $contentType); + $request = $this->getByIdRequest($owner_id, $id_property, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -189,7 +191,7 @@ public function crmV3OwnersWithHttpInfo($after = null, $archived = false, $email switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging', + '\HubSpot\Client\Crm\Owners\Model\PublicOwner', $request, $response, ); @@ -217,7 +219,7 @@ public function crmV3OwnersWithHttpInfo($after = null, $archived = false, $email } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging', + '\HubSpot\Client\Crm\Owners\Model\PublicOwner', $request, $response, ); @@ -226,7 +228,7 @@ public function crmV3OwnersWithHttpInfo($after = null, $archived = false, $email case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging', + '\HubSpot\Client\Crm\Owners\Model\PublicOwner', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -247,20 +249,21 @@ public function crmV3OwnersWithHttpInfo($after = null, $archived = false, $email } /** - * Operation crmV3OwnersAsync + * Operation getByIdAsync * - * @param string|null $after (optional) - * @param bool|null $archived (optional, default to false) - * @param string|null $email (optional) - * @param int|null $limit (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Owners'] to see the possible values for this operation + * Retrieve a specific owner by ID + * + * @param int $owner_id (required) + * @param string|null $id_property (optional, default to 'id') + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3OwnersAsync($after = null, $archived = false, $email = null, $limit = 100, string $contentType = self::contentTypes['crmV3Owners'][0]) + public function getByIdAsync($owner_id, $id_property = 'id', $archived = false, string $contentType = self::contentTypes['getById'][0]) { - return $this->crmV3OwnersAsyncWithHttpInfo($after, $archived, $email, $limit, $contentType) + return $this->getByIdAsyncWithHttpInfo($owner_id, $id_property, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -269,21 +272,22 @@ function ($response) { } /** - * Operation crmV3OwnersAsyncWithHttpInfo + * Operation getByIdAsyncWithHttpInfo * - * @param string|null $after (optional) - * @param bool|null $archived (optional, default to false) - * @param string|null $email (optional) - * @param int|null $limit (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Owners'] to see the possible values for this operation + * Retrieve a specific owner by ID + * + * @param int $owner_id (required) + * @param string|null $id_property (optional, default to 'id') + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmV3OwnersAsyncWithHttpInfo($after = null, $archived = false, $email = null, $limit = 100, string $contentType = self::contentTypes['crmV3Owners'][0]) + public function getByIdAsyncWithHttpInfo($owner_id, $id_property = 'id', $archived = false, string $contentType = self::contentTypes['getById'][0]) { - $returnType = '\HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging'; - $request = $this->crmV3OwnersRequest($after, $archived, $email, $limit, $contentType); + $returnType = '\HubSpot\Client\Crm\Owners\Model\PublicOwner'; + $request = $this->getByIdRequest($owner_id, $id_property, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -322,26 +326,30 @@ function ($exception) { } /** - * Create request for operation 'crmV3Owners' + * Create request for operation 'getById' * - * @param string|null $after (optional) - * @param bool|null $archived (optional, default to false) - * @param string|null $email (optional) - * @param int|null $limit (optional, default to 100) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmV3Owners'] to see the possible values for this operation + * @param int $owner_id (required) + * @param string|null $id_property (optional, default to 'id') + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmV3OwnersRequest($after = null, $archived = false, $email = null, $limit = 100, string $contentType = self::contentTypes['crmV3Owners'][0]) + public function getByIdRequest($owner_id, $id_property = 'id', $archived = false, string $contentType = self::contentTypes['getById'][0]) { + // verify the required parameter 'owner_id' is set + if ($owner_id === null || (is_array($owner_id) && count($owner_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $owner_id when calling getById' + ); + } - - $resourcePath = '/crm/v3/owners'; + $resourcePath = '/crm/v3/owners/{ownerId}'; $formParams = []; $queryParams = []; $headerParams = []; @@ -350,8 +358,8 @@ public function crmV3OwnersRequest($after = null, $archived = false, $email = nu // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $id_property, + 'idProperty', // param base name 'string', // openApiType 'form', // style true, // explode @@ -366,26 +374,16 @@ public function crmV3OwnersRequest($after = null, $archived = false, $email = nu true, // explode false // required ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $email, - 'email', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($owner_id !== null) { + $resourcePath = str_replace( + '{' . 'ownerId' . '}', + ObjectSerializer::toPathValue($owner_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -446,42 +444,40 @@ public function crmV3OwnersRequest($after = null, $archived = false, $email = nu } /** - * Operation getById - * - * Retrieve a specific owner by ID + * Operation getPage * - * @param int $owner_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string|null $id_property (optional, default to 'id') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param string|null $email email (optional) + * @param string|null $after after (optional) + * @param int|null $limit limit (optional, default to 100) + * @param bool|null $archived archived (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Owners\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Crm\Owners\Model\PublicOwner|\HubSpot\Client\Crm\Owners\Model\Error + * @return \HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging|\HubSpot\Client\Crm\Owners\Model\Error */ - public function getById($owner_id, $archived = false, $id_property = 'id', string $contentType = self::contentTypes['getById'][0]) + public function getPage($email = null, $after = null, $limit = 100, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getByIdWithHttpInfo($owner_id, $archived, $id_property, $contentType); + list($response) = $this->getPageWithHttpInfo($email, $after, $limit, $archived, $contentType); return $response; } /** - * Operation getByIdWithHttpInfo - * - * Retrieve a specific owner by ID + * Operation getPageWithHttpInfo * - * @param int $owner_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string|null $id_property (optional, default to 'id') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param string|null $email (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional, default to 100) + * @param bool|null $archived (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Owners\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Crm\Owners\Model\PublicOwner|\HubSpot\Client\Crm\Owners\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging|\HubSpot\Client\Crm\Owners\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($owner_id, $archived = false, $id_property = 'id', string $contentType = self::contentTypes['getById'][0]) + public function getPageWithHttpInfo($email = null, $after = null, $limit = 100, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getByIdRequest($owner_id, $archived, $id_property, $contentType); + $request = $this->getPageRequest($email, $after, $limit, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -509,7 +505,7 @@ public function getByIdWithHttpInfo($owner_id, $archived = false, $id_property = switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Owners\Model\PublicOwner', + '\HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging', $request, $response, ); @@ -537,7 +533,7 @@ public function getByIdWithHttpInfo($owner_id, $archived = false, $id_property = } return $this->handleResponseWithDataType( - '\HubSpot\Client\Crm\Owners\Model\PublicOwner', + '\HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging', $request, $response, ); @@ -546,7 +542,7 @@ public function getByIdWithHttpInfo($owner_id, $archived = false, $id_property = case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Crm\Owners\Model\PublicOwner', + '\HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -567,21 +563,20 @@ public function getByIdWithHttpInfo($owner_id, $archived = false, $id_property = } /** - * Operation getByIdAsync + * Operation getPageAsync * - * Retrieve a specific owner by ID - * - * @param int $owner_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string|null $id_property (optional, default to 'id') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param string|null $email (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional, default to 100) + * @param bool|null $archived (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($owner_id, $archived = false, $id_property = 'id', string $contentType = self::contentTypes['getById'][0]) + public function getPageAsync($email = null, $after = null, $limit = 100, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getByIdAsyncWithHttpInfo($owner_id, $archived, $id_property, $contentType) + return $this->getPageAsyncWithHttpInfo($email, $after, $limit, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -590,22 +585,21 @@ function ($response) { } /** - * Operation getByIdAsyncWithHttpInfo - * - * Retrieve a specific owner by ID + * Operation getPageAsyncWithHttpInfo * - * @param int $owner_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string|null $id_property (optional, default to 'id') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param string|null $email (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional, default to 100) + * @param bool|null $archived (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($owner_id, $archived = false, $id_property = 'id', string $contentType = self::contentTypes['getById'][0]) + public function getPageAsyncWithHttpInfo($email = null, $after = null, $limit = 100, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $returnType = '\HubSpot\Client\Crm\Owners\Model\PublicOwner'; - $request = $this->getByIdRequest($owner_id, $archived, $id_property, $contentType); + $returnType = '\HubSpot\Client\Crm\Owners\Model\CollectionResponsePublicOwnerForwardPaging'; + $request = $this->getPageRequest($email, $after, $limit, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -644,30 +638,26 @@ function ($exception) { } /** - * Create request for operation 'getById' + * Create request for operation 'getPage' * - * @param int $owner_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string|null $id_property (optional, default to 'id') - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param string|null $email (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional, default to 100) + * @param bool|null $archived (optional, default to false) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($owner_id, $archived = false, $id_property = 'id', string $contentType = self::contentTypes['getById'][0]) + public function getPageRequest($email = null, $after = null, $limit = 100, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - // verify the required parameter 'owner_id' is set - if ($owner_id === null || (is_array($owner_id) && count($owner_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $owner_id when calling getById' - ); - } - $resourcePath = '/crm/v3/owners/{ownerId}'; + + $resourcePath = '/crm/v3/owners'; $formParams = []; $queryParams = []; $headerParams = []; @@ -676,32 +666,42 @@ public function getByIdRequest($owner_id, $archived = false, $id_property = 'id' // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $email, + 'email', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); - // path params - if ($owner_id !== null) { - $resourcePath = str_replace( - '{' . 'ownerId' . '}', - ObjectSerializer::toPathValue($owner_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( diff --git a/codegen/Crm/Pipelines/Api/BasicApi.php b/codegen/Crm/Pipelines/Api/BasicApi.php index 618f3b2f..48b6109e 100644 --- a/codegen/Crm/Pipelines/Api/BasicApi.php +++ b/codegen/Crm/Pipelines/Api/BasicApi.php @@ -170,17 +170,17 @@ public function getConfig() * * @param string $object_type (required) * @param string $pipeline_id (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Pipelines\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function archive($object_type, $pipeline_id, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['archive'][0]) + public function archive($object_type, $pipeline_id, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['archive'][0]) { - $this->archiveWithHttpInfo($object_type, $pipeline_id, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType); + $this->archiveWithHttpInfo($object_type, $pipeline_id, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType); } /** @@ -190,17 +190,17 @@ public function archive($object_type, $pipeline_id, $validate_deal_stage_usages_ * * @param string $object_type (required) * @param string $pipeline_id (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Pipelines\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveWithHttpInfo($object_type, $pipeline_id, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['archive'][0]) + public function archiveWithHttpInfo($object_type, $pipeline_id, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['archive'][0]) { - $request = $this->archiveRequest($object_type, $pipeline_id, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType); + $request = $this->archiveRequest($object_type, $pipeline_id, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType); try { $options = $this->createHttpClientOption(); @@ -250,16 +250,16 @@ public function archiveWithHttpInfo($object_type, $pipeline_id, $validate_deal_s * * @param string $object_type (required) * @param string $pipeline_id (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsync($object_type, $pipeline_id, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsync($object_type, $pipeline_id, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['archive'][0]) { - return $this->archiveAsyncWithHttpInfo($object_type, $pipeline_id, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType) + return $this->archiveAsyncWithHttpInfo($object_type, $pipeline_id, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType) ->then( function ($response) { return $response[0]; @@ -274,17 +274,17 @@ function ($response) { * * @param string $object_type (required) * @param string $pipeline_id (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsyncWithHttpInfo($object_type, $pipeline_id, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsyncWithHttpInfo($object_type, $pipeline_id, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['archive'][0]) { $returnType = ''; - $request = $this->archiveRequest($object_type, $pipeline_id, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType); + $request = $this->archiveRequest($object_type, $pipeline_id, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -314,14 +314,14 @@ function ($exception) { * * @param string $object_type (required) * @param string $pipeline_id (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveRequest($object_type, $pipeline_id, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['archive'][0]) + public function archiveRequest($object_type, $pipeline_id, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['archive'][0]) { // verify the required parameter 'object_type' is set @@ -350,8 +350,8 @@ public function archiveRequest($object_type, $pipeline_id, $validate_deal_stage_ // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $validate_deal_stage_usages_before_delete, - 'validateDealStageUsagesBeforeDelete', // param base name + $validate_references_before_delete, + 'validateReferencesBeforeDelete', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -359,8 +359,8 @@ public function archiveRequest($object_type, $pipeline_id, $validate_deal_stage_ ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $validate_references_before_delete, - 'validateReferencesBeforeDelete', // param base name + $validate_deal_stage_usages_before_delete, + 'validateDealStageUsagesBeforeDelete', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -2260,17 +2260,17 @@ public function getAuditRequest($object_type, $pipeline_id, string $contentType * Operation getAudit_0 * * @param string $object_type (required) - * @param string $pipeline_id pipeline_id (required) * @param string $stage_id (required) + * @param string $pipeline_id pipeline_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAudit_0'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Pipelines\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Pipelines\Model\CollectionResponsePublicAuditInfoNoPaging|\HubSpot\Client\Crm\Pipelines\Model\Error */ - public function getAudit_0($object_type, $pipeline_id, $stage_id, string $contentType = self::contentTypes['getAudit_0'][0]) + public function getAudit_0($object_type, $stage_id, $pipeline_id, string $contentType = self::contentTypes['getAudit_0'][0]) { - list($response) = $this->getAudit_0WithHttpInfo($object_type, $pipeline_id, $stage_id, $contentType); + list($response) = $this->getAudit_0WithHttpInfo($object_type, $stage_id, $pipeline_id, $contentType); return $response; } @@ -2278,17 +2278,17 @@ public function getAudit_0($object_type, $pipeline_id, $stage_id, string $conten * Operation getAudit_0WithHttpInfo * * @param string $object_type (required) - * @param string $pipeline_id (required) * @param string $stage_id (required) + * @param string $pipeline_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAudit_0'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Pipelines\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Pipelines\Model\CollectionResponsePublicAuditInfoNoPaging|\HubSpot\Client\Crm\Pipelines\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getAudit_0WithHttpInfo($object_type, $pipeline_id, $stage_id, string $contentType = self::contentTypes['getAudit_0'][0]) + public function getAudit_0WithHttpInfo($object_type, $stage_id, $pipeline_id, string $contentType = self::contentTypes['getAudit_0'][0]) { - $request = $this->getAudit_0Request($object_type, $pipeline_id, $stage_id, $contentType); + $request = $this->getAudit_0Request($object_type, $stage_id, $pipeline_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -2377,16 +2377,16 @@ public function getAudit_0WithHttpInfo($object_type, $pipeline_id, $stage_id, st * Operation getAudit_0Async * * @param string $object_type (required) - * @param string $pipeline_id (required) * @param string $stage_id (required) + * @param string $pipeline_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAudit_0'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAudit_0Async($object_type, $pipeline_id, $stage_id, string $contentType = self::contentTypes['getAudit_0'][0]) + public function getAudit_0Async($object_type, $stage_id, $pipeline_id, string $contentType = self::contentTypes['getAudit_0'][0]) { - return $this->getAudit_0AsyncWithHttpInfo($object_type, $pipeline_id, $stage_id, $contentType) + return $this->getAudit_0AsyncWithHttpInfo($object_type, $stage_id, $pipeline_id, $contentType) ->then( function ($response) { return $response[0]; @@ -2398,17 +2398,17 @@ function ($response) { * Operation getAudit_0AsyncWithHttpInfo * * @param string $object_type (required) - * @param string $pipeline_id (required) * @param string $stage_id (required) + * @param string $pipeline_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAudit_0'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getAudit_0AsyncWithHttpInfo($object_type, $pipeline_id, $stage_id, string $contentType = self::contentTypes['getAudit_0'][0]) + public function getAudit_0AsyncWithHttpInfo($object_type, $stage_id, $pipeline_id, string $contentType = self::contentTypes['getAudit_0'][0]) { $returnType = '\HubSpot\Client\Crm\Pipelines\Model\CollectionResponsePublicAuditInfoNoPaging'; - $request = $this->getAudit_0Request($object_type, $pipeline_id, $stage_id, $contentType); + $request = $this->getAudit_0Request($object_type, $stage_id, $pipeline_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2450,14 +2450,14 @@ function ($exception) { * Create request for operation 'getAudit_0' * * @param string $object_type (required) - * @param string $pipeline_id (required) * @param string $stage_id (required) + * @param string $pipeline_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getAudit_0'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getAudit_0Request($object_type, $pipeline_id, $stage_id, string $contentType = self::contentTypes['getAudit_0'][0]) + public function getAudit_0Request($object_type, $stage_id, $pipeline_id, string $contentType = self::contentTypes['getAudit_0'][0]) { // verify the required parameter 'object_type' is set @@ -2467,6 +2467,13 @@ public function getAudit_0Request($object_type, $pipeline_id, $stage_id, string ); } + // verify the required parameter 'stage_id' is set + if ($stage_id === null || (is_array($stage_id) && count($stage_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $stage_id when calling getAudit_0' + ); + } + // verify the required parameter 'pipeline_id' is set if ($pipeline_id === null || (is_array($pipeline_id) && count($pipeline_id) === 0)) { throw new \InvalidArgumentException( @@ -2477,13 +2484,6 @@ public function getAudit_0Request($object_type, $pipeline_id, $stage_id, string throw new \InvalidArgumentException("invalid value for \"pipeline_id\" when calling BasicApi.getAudit_0, must conform to the pattern /.+/."); } - // verify the required parameter 'stage_id' is set - if ($stage_id === null || (is_array($stage_id) && count($stage_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $stage_id when calling getAudit_0' - ); - } - $resourcePath = '/crm/v3/pipelines/{objectType}/{pipelineId}/stages/{stageId}/audit'; $formParams = []; @@ -2503,18 +2503,18 @@ public function getAudit_0Request($object_type, $pipeline_id, $stage_id, string ); } // path params - if ($pipeline_id !== null) { + if ($stage_id !== null) { $resourcePath = str_replace( - '{' . 'pipelineId' . '}', - ObjectSerializer::toPathValue($pipeline_id), + '{' . 'stageId' . '}', + ObjectSerializer::toPathValue($stage_id), $resourcePath ); } // path params - if ($stage_id !== null) { + if ($pipeline_id !== null) { $resourcePath = str_replace( - '{' . 'stageId' . '}', - ObjectSerializer::toPathValue($stage_id), + '{' . 'pipelineId' . '}', + ObjectSerializer::toPathValue($pipeline_id), $resourcePath ); } @@ -3217,17 +3217,17 @@ public function getById_0Request($object_type, $pipeline_id, $stage_id, string $ * @param string $object_type (required) * @param string $pipeline_id (required) * @param \HubSpot\Client\Crm\Pipelines\Model\PipelineReplaceInput $pipeline_replace_input pipeline_replace_input (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['replace'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Pipelines\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Pipelines\Model\Pipeline|\HubSpot\Client\Crm\Pipelines\Model\Error */ - public function replace($object_type, $pipeline_id, $pipeline_replace_input, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['replace'][0]) + public function replace($object_type, $pipeline_id, $pipeline_replace_input, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['replace'][0]) { - list($response) = $this->replaceWithHttpInfo($object_type, $pipeline_id, $pipeline_replace_input, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType); + list($response) = $this->replaceWithHttpInfo($object_type, $pipeline_id, $pipeline_replace_input, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType); return $response; } @@ -3239,17 +3239,17 @@ public function replace($object_type, $pipeline_id, $pipeline_replace_input, $va * @param string $object_type (required) * @param string $pipeline_id (required) * @param \HubSpot\Client\Crm\Pipelines\Model\PipelineReplaceInput $pipeline_replace_input (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['replace'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Pipelines\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Pipelines\Model\Pipeline|\HubSpot\Client\Crm\Pipelines\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function replaceWithHttpInfo($object_type, $pipeline_id, $pipeline_replace_input, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['replace'][0]) + public function replaceWithHttpInfo($object_type, $pipeline_id, $pipeline_replace_input, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['replace'][0]) { - $request = $this->replaceRequest($object_type, $pipeline_id, $pipeline_replace_input, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType); + $request = $this->replaceRequest($object_type, $pipeline_id, $pipeline_replace_input, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType); try { $options = $this->createHttpClientOption(); @@ -3342,16 +3342,16 @@ public function replaceWithHttpInfo($object_type, $pipeline_id, $pipeline_replac * @param string $object_type (required) * @param string $pipeline_id (required) * @param \HubSpot\Client\Crm\Pipelines\Model\PipelineReplaceInput $pipeline_replace_input (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['replace'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function replaceAsync($object_type, $pipeline_id, $pipeline_replace_input, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['replace'][0]) + public function replaceAsync($object_type, $pipeline_id, $pipeline_replace_input, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['replace'][0]) { - return $this->replaceAsyncWithHttpInfo($object_type, $pipeline_id, $pipeline_replace_input, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType) + return $this->replaceAsyncWithHttpInfo($object_type, $pipeline_id, $pipeline_replace_input, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType) ->then( function ($response) { return $response[0]; @@ -3367,17 +3367,17 @@ function ($response) { * @param string $object_type (required) * @param string $pipeline_id (required) * @param \HubSpot\Client\Crm\Pipelines\Model\PipelineReplaceInput $pipeline_replace_input (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['replace'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function replaceAsyncWithHttpInfo($object_type, $pipeline_id, $pipeline_replace_input, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['replace'][0]) + public function replaceAsyncWithHttpInfo($object_type, $pipeline_id, $pipeline_replace_input, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['replace'][0]) { $returnType = '\HubSpot\Client\Crm\Pipelines\Model\Pipeline'; - $request = $this->replaceRequest($object_type, $pipeline_id, $pipeline_replace_input, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType); + $request = $this->replaceRequest($object_type, $pipeline_id, $pipeline_replace_input, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -3421,14 +3421,14 @@ function ($exception) { * @param string $object_type (required) * @param string $pipeline_id (required) * @param \HubSpot\Client\Crm\Pipelines\Model\PipelineReplaceInput $pipeline_replace_input (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['replace'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function replaceRequest($object_type, $pipeline_id, $pipeline_replace_input, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['replace'][0]) + public function replaceRequest($object_type, $pipeline_id, $pipeline_replace_input, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['replace'][0]) { // verify the required parameter 'object_type' is set @@ -3464,8 +3464,8 @@ public function replaceRequest($object_type, $pipeline_id, $pipeline_replace_inp // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $validate_deal_stage_usages_before_delete, - 'validateDealStageUsagesBeforeDelete', // param base name + $validate_references_before_delete, + 'validateReferencesBeforeDelete', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -3473,8 +3473,8 @@ public function replaceRequest($object_type, $pipeline_id, $pipeline_replace_inp ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $validate_references_before_delete, - 'validateReferencesBeforeDelete', // param base name + $validate_deal_stage_usages_before_delete, + 'validateDealStageUsagesBeforeDelete', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -3915,17 +3915,17 @@ public function replace_0Request($object_type, $pipeline_id, $stage_id, $pipelin * @param string $object_type (required) * @param string $pipeline_id (required) * @param \HubSpot\Client\Crm\Pipelines\Model\PipelinePatchInput $pipeline_patch_input pipeline_patch_input (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Pipelines\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Pipelines\Model\Pipeline|\HubSpot\Client\Crm\Pipelines\Model\Error */ - public function update($object_type, $pipeline_id, $pipeline_patch_input, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['update'][0]) + public function update($object_type, $pipeline_id, $pipeline_patch_input, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['update'][0]) { - list($response) = $this->updateWithHttpInfo($object_type, $pipeline_id, $pipeline_patch_input, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType); + list($response) = $this->updateWithHttpInfo($object_type, $pipeline_id, $pipeline_patch_input, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType); return $response; } @@ -3935,17 +3935,17 @@ public function update($object_type, $pipeline_id, $pipeline_patch_input, $valid * @param string $object_type (required) * @param string $pipeline_id (required) * @param \HubSpot\Client\Crm\Pipelines\Model\PipelinePatchInput $pipeline_patch_input (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Pipelines\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Pipelines\Model\Pipeline|\HubSpot\Client\Crm\Pipelines\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function updateWithHttpInfo($object_type, $pipeline_id, $pipeline_patch_input, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['update'][0]) + public function updateWithHttpInfo($object_type, $pipeline_id, $pipeline_patch_input, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['update'][0]) { - $request = $this->updateRequest($object_type, $pipeline_id, $pipeline_patch_input, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType); + $request = $this->updateRequest($object_type, $pipeline_id, $pipeline_patch_input, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType); try { $options = $this->createHttpClientOption(); @@ -4036,16 +4036,16 @@ public function updateWithHttpInfo($object_type, $pipeline_id, $pipeline_patch_i * @param string $object_type (required) * @param string $pipeline_id (required) * @param \HubSpot\Client\Crm\Pipelines\Model\PipelinePatchInput $pipeline_patch_input (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsync($object_type, $pipeline_id, $pipeline_patch_input, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['update'][0]) + public function updateAsync($object_type, $pipeline_id, $pipeline_patch_input, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['update'][0]) { - return $this->updateAsyncWithHttpInfo($object_type, $pipeline_id, $pipeline_patch_input, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType) + return $this->updateAsyncWithHttpInfo($object_type, $pipeline_id, $pipeline_patch_input, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType) ->then( function ($response) { return $response[0]; @@ -4059,17 +4059,17 @@ function ($response) { * @param string $object_type (required) * @param string $pipeline_id (required) * @param \HubSpot\Client\Crm\Pipelines\Model\PipelinePatchInput $pipeline_patch_input (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsyncWithHttpInfo($object_type, $pipeline_id, $pipeline_patch_input, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['update'][0]) + public function updateAsyncWithHttpInfo($object_type, $pipeline_id, $pipeline_patch_input, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['update'][0]) { $returnType = '\HubSpot\Client\Crm\Pipelines\Model\Pipeline'; - $request = $this->updateRequest($object_type, $pipeline_id, $pipeline_patch_input, $validate_deal_stage_usages_before_delete, $validate_references_before_delete, $contentType); + $request = $this->updateRequest($object_type, $pipeline_id, $pipeline_patch_input, $validate_references_before_delete, $validate_deal_stage_usages_before_delete, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4113,14 +4113,14 @@ function ($exception) { * @param string $object_type (required) * @param string $pipeline_id (required) * @param \HubSpot\Client\Crm\Pipelines\Model\PipelinePatchInput $pipeline_patch_input (required) - * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param bool|null $validate_references_before_delete (optional, default to false) + * @param bool|null $validate_deal_stage_usages_before_delete (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateRequest($object_type, $pipeline_id, $pipeline_patch_input, $validate_deal_stage_usages_before_delete = false, $validate_references_before_delete = false, string $contentType = self::contentTypes['update'][0]) + public function updateRequest($object_type, $pipeline_id, $pipeline_patch_input, $validate_references_before_delete = false, $validate_deal_stage_usages_before_delete = false, string $contentType = self::contentTypes['update'][0]) { // verify the required parameter 'object_type' is set @@ -4156,8 +4156,8 @@ public function updateRequest($object_type, $pipeline_id, $pipeline_patch_input, // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $validate_deal_stage_usages_before_delete, - 'validateDealStageUsagesBeforeDelete', // param base name + $validate_references_before_delete, + 'validateReferencesBeforeDelete', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -4165,8 +4165,8 @@ public function updateRequest($object_type, $pipeline_id, $pipeline_patch_input, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $validate_references_before_delete, - 'validateReferencesBeforeDelete', // param base name + $validate_deal_stage_usages_before_delete, + 'validateDealStageUsagesBeforeDelete', // param base name 'boolean', // openApiType 'form', // style true, // explode diff --git a/codegen/Crm/Products/Api/BasicApi.php b/codegen/Crm/Products/Api/BasicApi.php index e0f2f253..d5765834 100644 --- a/codegen/Crm/Products/Api/BasicApi.php +++ b/codegen/Crm/Products/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $product_id product_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Products\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Products\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Products\Model\Error */ - public function getById($product_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($product_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($product_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($product_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($product_id, $archived = false, $associations = null, $i * Read * * @param string $product_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Products\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Products\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Products\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($product_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($product_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($product_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($product_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($product_id, $archived = false, $association * Read * * @param string $product_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($product_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($product_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($product_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($product_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $product_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($product_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($product_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Products\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($product_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($product_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $product_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($product_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($product_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'product_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($product_id, $archived = false, $associations = n // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($product_id, $archived = false, $associations = n ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($product_id, $archived = false, $associations = n * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of products that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Products\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Products\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Products\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of products that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Products\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Products\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Products\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of products that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of products that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Products\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of products that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Quotes/Api/BasicApi.php b/codegen/Crm/Quotes/Api/BasicApi.php index 7bcf3ba4..b2679c9f 100644 --- a/codegen/Crm/Quotes/Api/BasicApi.php +++ b/codegen/Crm/Quotes/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $quote_id quote_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Quotes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Quotes\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Quotes\Model\Error */ - public function getById($quote_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($quote_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($quote_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($quote_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($quote_id, $archived = false, $associations = null, $id_ * Read * * @param string $quote_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Quotes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Quotes\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Quotes\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($quote_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($quote_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($quote_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($quote_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($quote_id, $archived = false, $associations * Read * * @param string $quote_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($quote_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($quote_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($quote_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($quote_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $quote_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($quote_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($quote_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Quotes\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($quote_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($quote_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $quote_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($quote_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($quote_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'quote_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($quote_id, $archived = false, $associations = nul // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($quote_id, $archived = false, $associations = nul ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($quote_id, $archived = false, $associations = nul * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Quotes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Quotes\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Quotes\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Quotes\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Quotes\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Quotes\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Quotes\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Schemas/Api/BasicApi.php b/codegen/Crm/Schemas/Api/BasicApi.php index 23a806e2..f06697ac 100644 --- a/codegen/Crm/Schemas/Api/BasicApi.php +++ b/codegen/Crm/Schemas/Api/BasicApi.php @@ -389,17 +389,17 @@ public function archiveRequest($object_type, $archived = false, string $contentT * * Delete an existing association for a specified object type. * - * @param string $association_identifier Unique ID of the association to remove. (required) * @param string $object_type Fully qualified name or object type ID of your schema. (required) + * @param string $association_identifier Unique ID of the association to remove. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveAssociation'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Schemas\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function archiveAssociation($association_identifier, $object_type, string $contentType = self::contentTypes['archiveAssociation'][0]) + public function archiveAssociation($object_type, $association_identifier, string $contentType = self::contentTypes['archiveAssociation'][0]) { - $this->archiveAssociationWithHttpInfo($association_identifier, $object_type, $contentType); + $this->archiveAssociationWithHttpInfo($object_type, $association_identifier, $contentType); } /** @@ -407,17 +407,17 @@ public function archiveAssociation($association_identifier, $object_type, string * * Delete an existing association for a specified object type. * - * @param string $association_identifier Unique ID of the association to remove. (required) * @param string $object_type Fully qualified name or object type ID of your schema. (required) + * @param string $association_identifier Unique ID of the association to remove. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveAssociation'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Schemas\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveAssociationWithHttpInfo($association_identifier, $object_type, string $contentType = self::contentTypes['archiveAssociation'][0]) + public function archiveAssociationWithHttpInfo($object_type, $association_identifier, string $contentType = self::contentTypes['archiveAssociation'][0]) { - $request = $this->archiveAssociationRequest($association_identifier, $object_type, $contentType); + $request = $this->archiveAssociationRequest($object_type, $association_identifier, $contentType); try { $options = $this->createHttpClientOption(); @@ -465,16 +465,16 @@ public function archiveAssociationWithHttpInfo($association_identifier, $object_ * * Delete an existing association for a specified object type. * - * @param string $association_identifier Unique ID of the association to remove. (required) * @param string $object_type Fully qualified name or object type ID of your schema. (required) + * @param string $association_identifier Unique ID of the association to remove. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveAssociation'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAssociationAsync($association_identifier, $object_type, string $contentType = self::contentTypes['archiveAssociation'][0]) + public function archiveAssociationAsync($object_type, $association_identifier, string $contentType = self::contentTypes['archiveAssociation'][0]) { - return $this->archiveAssociationAsyncWithHttpInfo($association_identifier, $object_type, $contentType) + return $this->archiveAssociationAsyncWithHttpInfo($object_type, $association_identifier, $contentType) ->then( function ($response) { return $response[0]; @@ -487,17 +487,17 @@ function ($response) { * * Delete an existing association for a specified object type. * - * @param string $association_identifier Unique ID of the association to remove. (required) * @param string $object_type Fully qualified name or object type ID of your schema. (required) + * @param string $association_identifier Unique ID of the association to remove. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveAssociation'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAssociationAsyncWithHttpInfo($association_identifier, $object_type, string $contentType = self::contentTypes['archiveAssociation'][0]) + public function archiveAssociationAsyncWithHttpInfo($object_type, $association_identifier, string $contentType = self::contentTypes['archiveAssociation'][0]) { $returnType = ''; - $request = $this->archiveAssociationRequest($association_identifier, $object_type, $contentType); + $request = $this->archiveAssociationRequest($object_type, $association_identifier, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -525,27 +525,27 @@ function ($exception) { /** * Create request for operation 'archiveAssociation' * - * @param string $association_identifier Unique ID of the association to remove. (required) * @param string $object_type Fully qualified name or object type ID of your schema. (required) + * @param string $association_identifier Unique ID of the association to remove. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archiveAssociation'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveAssociationRequest($association_identifier, $object_type, string $contentType = self::contentTypes['archiveAssociation'][0]) + public function archiveAssociationRequest($object_type, $association_identifier, string $contentType = self::contentTypes['archiveAssociation'][0]) { - // verify the required parameter 'association_identifier' is set - if ($association_identifier === null || (is_array($association_identifier) && count($association_identifier) === 0)) { + // 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 $association_identifier when calling archiveAssociation' + 'Missing the required parameter $object_type when calling archiveAssociation' ); } - // verify the required parameter 'object_type' is set - if ($object_type === null || (is_array($object_type) && count($object_type) === 0)) { + // verify the required parameter 'association_identifier' is set + if ($association_identifier === null || (is_array($association_identifier) && count($association_identifier) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $object_type when calling archiveAssociation' + 'Missing the required parameter $association_identifier when calling archiveAssociation' ); } @@ -560,18 +560,18 @@ public function archiveAssociationRequest($association_identifier, $object_type, // path params - if ($association_identifier !== null) { + if ($object_type !== null) { $resourcePath = str_replace( - '{' . 'associationIdentifier' . '}', - ObjectSerializer::toPathValue($association_identifier), + '{' . 'objectType' . '}', + ObjectSerializer::toPathValue($object_type), $resourcePath ); } // path params - if ($object_type !== null) { + if ($association_identifier !== null) { $resourcePath = str_replace( - '{' . 'objectType' . '}', - ObjectSerializer::toPathValue($object_type), + '{' . 'associationIdentifier' . '}', + ObjectSerializer::toPathValue($association_identifier), $resourcePath ); } diff --git a/codegen/Crm/Schemas/Api/BatchApi.php b/codegen/Crm/Schemas/Api/BatchApi.php index 14d29071..6e850e86 100644 --- a/codegen/Crm/Schemas/Api/BatchApi.php +++ b/codegen/Crm/Schemas/Api/BatchApi.php @@ -73,7 +73,7 @@ class BatchApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'crmObjectSchemasV3SchemasBatchRead' => [ + 'read' => [ 'application/json', ], ]; @@ -125,38 +125,38 @@ public function getConfig() } /** - * Operation crmObjectSchemasV3SchemasBatchRead + * Operation read * * Retrieve multiple custom object schemas in a batch request. * * @param \HubSpot\Client\Crm\Schemas\Model\ObjectSchemaBatchReadRequest $object_schema_batch_read_request object_schema_batch_read_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectSchemasV3SchemasBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Schemas\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Schemas\Model\CollectionResponseObjectSchemaNoPaging|\HubSpot\Client\Crm\Schemas\Model\Error */ - public function crmObjectSchemasV3SchemasBatchRead($object_schema_batch_read_request, string $contentType = self::contentTypes['crmObjectSchemasV3SchemasBatchRead'][0]) + public function read($object_schema_batch_read_request, string $contentType = self::contentTypes['read'][0]) { - list($response) = $this->crmObjectSchemasV3SchemasBatchReadWithHttpInfo($object_schema_batch_read_request, $contentType); + list($response) = $this->readWithHttpInfo($object_schema_batch_read_request, $contentType); return $response; } /** - * Operation crmObjectSchemasV3SchemasBatchReadWithHttpInfo + * Operation readWithHttpInfo * * Retrieve multiple custom object schemas in a batch request. * * @param \HubSpot\Client\Crm\Schemas\Model\ObjectSchemaBatchReadRequest $object_schema_batch_read_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectSchemasV3SchemasBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Schemas\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Schemas\Model\CollectionResponseObjectSchemaNoPaging|\HubSpot\Client\Crm\Schemas\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function crmObjectSchemasV3SchemasBatchReadWithHttpInfo($object_schema_batch_read_request, string $contentType = self::contentTypes['crmObjectSchemasV3SchemasBatchRead'][0]) + public function readWithHttpInfo($object_schema_batch_read_request, string $contentType = self::contentTypes['read'][0]) { - $request = $this->crmObjectSchemasV3SchemasBatchReadRequest($object_schema_batch_read_request, $contentType); + $request = $this->readRequest($object_schema_batch_read_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -242,19 +242,19 @@ public function crmObjectSchemasV3SchemasBatchReadWithHttpInfo($object_schema_ba } /** - * Operation crmObjectSchemasV3SchemasBatchReadAsync + * Operation readAsync * * Retrieve multiple custom object schemas in a batch request. * * @param \HubSpot\Client\Crm\Schemas\Model\ObjectSchemaBatchReadRequest $object_schema_batch_read_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectSchemasV3SchemasBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmObjectSchemasV3SchemasBatchReadAsync($object_schema_batch_read_request, string $contentType = self::contentTypes['crmObjectSchemasV3SchemasBatchRead'][0]) + public function readAsync($object_schema_batch_read_request, string $contentType = self::contentTypes['read'][0]) { - return $this->crmObjectSchemasV3SchemasBatchReadAsyncWithHttpInfo($object_schema_batch_read_request, $contentType) + return $this->readAsyncWithHttpInfo($object_schema_batch_read_request, $contentType) ->then( function ($response) { return $response[0]; @@ -263,20 +263,20 @@ function ($response) { } /** - * Operation crmObjectSchemasV3SchemasBatchReadAsyncWithHttpInfo + * Operation readAsyncWithHttpInfo * * Retrieve multiple custom object schemas in a batch request. * * @param \HubSpot\Client\Crm\Schemas\Model\ObjectSchemaBatchReadRequest $object_schema_batch_read_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectSchemasV3SchemasBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function crmObjectSchemasV3SchemasBatchReadAsyncWithHttpInfo($object_schema_batch_read_request, string $contentType = self::contentTypes['crmObjectSchemasV3SchemasBatchRead'][0]) + public function readAsyncWithHttpInfo($object_schema_batch_read_request, string $contentType = self::contentTypes['read'][0]) { $returnType = '\HubSpot\Client\Crm\Schemas\Model\CollectionResponseObjectSchemaNoPaging'; - $request = $this->crmObjectSchemasV3SchemasBatchReadRequest($object_schema_batch_read_request, $contentType); + $request = $this->readRequest($object_schema_batch_read_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -315,21 +315,21 @@ function ($exception) { } /** - * Create request for operation 'crmObjectSchemasV3SchemasBatchRead' + * Create request for operation 'read' * * @param \HubSpot\Client\Crm\Schemas\Model\ObjectSchemaBatchReadRequest $object_schema_batch_read_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['crmObjectSchemasV3SchemasBatchRead'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['read'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function crmObjectSchemasV3SchemasBatchReadRequest($object_schema_batch_read_request, string $contentType = self::contentTypes['crmObjectSchemasV3SchemasBatchRead'][0]) + public function readRequest($object_schema_batch_read_request, string $contentType = self::contentTypes['read'][0]) { // verify the required parameter 'object_schema_batch_read_request' is set if ($object_schema_batch_read_request === null || (is_array($object_schema_batch_read_request) && count($object_schema_batch_read_request) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $object_schema_batch_read_request when calling crmObjectSchemasV3SchemasBatchRead' + 'Missing the required parameter $object_schema_batch_read_request when calling read' ); } diff --git a/codegen/Crm/Tickets/Api/BasicApi.php b/codegen/Crm/Tickets/Api/BasicApi.php index 1ef208a7..a38eb0af 100644 --- a/codegen/Crm/Tickets/Api/BasicApi.php +++ b/codegen/Crm/Tickets/Api/BasicApi.php @@ -660,20 +660,20 @@ public function createRequest($simple_public_object_input_for_create, string $co * Read * * @param string $ticket_id ticket_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Tickets\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Tickets\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Tickets\Model\Error */ - public function getById($ticket_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($ticket_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($ticket_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + list($response) = $this->getByIdWithHttpInfo($ticket_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $response; } @@ -683,20 +683,20 @@ public function getById($ticket_id, $archived = false, $associations = null, $id * Read * * @param string $ticket_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Tickets\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Tickets\Model\SimplePublicObjectWithAssociations|\HubSpot\Client\Crm\Tickets\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($ticket_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($ticket_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($ticket_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($ticket_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); try { $options = $this->createHttpClientOption(); @@ -787,19 +787,19 @@ public function getByIdWithHttpInfo($ticket_id, $archived = false, $associations * Read * * @param string $ticket_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($ticket_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($ticket_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($ticket_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType) + return $this->getByIdAsyncWithHttpInfo($ticket_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType) ->then( function ($response) { return $response[0]; @@ -813,20 +813,20 @@ function ($response) { * Read * * @param string $ticket_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($ticket_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($ticket_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Tickets\Model\SimplePublicObjectWithAssociations'; - $request = $this->getByIdRequest($ticket_id, $archived, $associations, $id_property, $properties, $properties_with_history, $contentType); + $request = $this->getByIdRequest($ticket_id, $properties, $properties_with_history, $associations, $archived, $id_property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -868,17 +868,17 @@ function ($exception) { * Create request for operation 'getById' * * @param string $ticket_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) - * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) + * @param string|null $id_property The name of a property whose values are unique for this object type (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($ticket_id, $archived = false, $associations = null, $id_property = null, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($ticket_id, $properties = null, $properties_with_history = null, $associations = null, $archived = false, $id_property = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'ticket_id' is set @@ -906,17 +906,17 @@ public function getByIdRequest($ticket_id, $archived = false, $associations = nu // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties_with_history, + 'propertiesWithHistory', // param base name 'array', // openApiType 'form', // style true, // explode @@ -924,27 +924,27 @@ public function getByIdRequest($ticket_id, $archived = false, $associations = nu ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_property, - 'idProperty', // param base name - 'string', // openApiType + $associations, + 'associations', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $id_property, + 'idProperty', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1023,21 +1023,21 @@ public function getByIdRequest($ticket_id, $archived = false, $associations = nu * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Tickets\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Crm\Tickets\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Tickets\Model\Error */ - public function getPage($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPage($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->getPageWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $response; } @@ -1046,21 +1046,21 @@ public function getPage($after = null, $archived = false, $associations = null, * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Tickets\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Crm\Tickets\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging|\HubSpot\Client\Crm\Tickets\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getPageWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -1150,20 +1150,20 @@ public function getPageWithHttpInfo($after = null, $archived = false, $associati * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsync($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsync($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { - return $this->getPageAsyncWithHttpInfo($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -1176,21 +1176,21 @@ function ($response) { * * List * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getPageAsyncWithHttpInfo($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageAsyncWithHttpInfo($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Crm\Tickets\Model\CollectionResponseSimplePublicObjectWithAssociationsForwardPaging'; - $request = $this->getPageRequest($after, $archived, $associations, $limit, $properties, $properties_with_history, $contentType); + $request = $this->getPageRequest($limit, $after, $properties, $properties_with_history, $associations, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1231,18 +1231,18 @@ function ($exception) { /** * Create request for operation 'getPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) - * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) - * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) * @param int|null $limit The maximum number of results to display per page. (optional, default to 10) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string[]|null $properties A comma separated list of the properties to be returned in the response. If any of the specified properties are not present on the requested object(s), they will be ignored. (optional) * @param string[]|null $properties_with_history A comma separated list of the properties to be returned along with their history of previous values. If any of the specified properties are not present on the requested object(s), they will be ignored. Usage of this parameter will reduce the maximum number of objects that can be read by a single request. (optional) + * @param string[]|null $associations A comma separated list of object types to retrieve associated IDs for. If any of the specified associations do not exist, they will be ignored. (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional, default to false) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getPageRequest($after = null, $archived = false, $associations = null, $limit = 10, $properties = null, $properties_with_history = null, string $contentType = self::contentTypes['getPage'][0]) + public function getPageRequest($limit = 10, $after = null, $properties = null, $properties_with_history = null, $associations = null, $archived = false, string $contentType = self::contentTypes['getPage'][0]) { @@ -1261,26 +1261,26 @@ public function getPageRequest($after = null, $archived = false, $associations = // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $associations, - 'associations', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1288,17 +1288,17 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $properties_with_history, + 'propertiesWithHistory', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $associations, + 'associations', // param base name 'array', // openApiType 'form', // style true, // explode @@ -1306,9 +1306,9 @@ public function getPageRequest($after = null, $archived = false, $associations = ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties_with_history, - 'propertiesWithHistory', // param base name - 'array', // openApiType + $archived, + 'archived', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Crm/Timeline/Api/AdvancedApi.php b/codegen/Crm/Timeline/Api/AdvancedApi.php index ad03d8e1..7b4d5ced 100644 --- a/codegen/Crm/Timeline/Api/AdvancedApi.php +++ b/codegen/Crm/Timeline/Api/AdvancedApi.php @@ -422,8 +422,8 @@ public function createRequest($timeline_event, string $contentType = self::conte * * Add tokens to an existing template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken $timeline_event_template_token timeline_event_template_token (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create_0'] to see the possible values for this operation * @@ -432,9 +432,9 @@ public function createRequest($timeline_event, string $contentType = self::conte * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken|\HubSpot\Client\Crm\Timeline\Model\Error * @deprecated */ - public function create_0($app_id, $event_template_id, $timeline_event_template_token, string $contentType = self::contentTypes['create_0'][0]) + public function create_0($event_template_id, $app_id, $timeline_event_template_token, string $contentType = self::contentTypes['create_0'][0]) { - list($response) = $this->create_0WithHttpInfo($app_id, $event_template_id, $timeline_event_template_token, $contentType); + list($response) = $this->create_0WithHttpInfo($event_template_id, $app_id, $timeline_event_template_token, $contentType); return $response; } @@ -443,8 +443,8 @@ public function create_0($app_id, $event_template_id, $timeline_event_template_t * * Add tokens to an existing template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken $timeline_event_template_token (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create_0'] to see the possible values for this operation * @@ -453,9 +453,9 @@ public function create_0($app_id, $event_template_id, $timeline_event_template_t * @return array of \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function create_0WithHttpInfo($app_id, $event_template_id, $timeline_event_template_token, string $contentType = self::contentTypes['create_0'][0]) + public function create_0WithHttpInfo($event_template_id, $app_id, $timeline_event_template_token, string $contentType = self::contentTypes['create_0'][0]) { - $request = $this->create_0Request($app_id, $event_template_id, $timeline_event_template_token, $contentType); + $request = $this->create_0Request($event_template_id, $app_id, $timeline_event_template_token, $contentType); try { $options = $this->createHttpClientOption(); @@ -545,8 +545,8 @@ public function create_0WithHttpInfo($app_id, $event_template_id, $timeline_even * * Add tokens to an existing template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken $timeline_event_template_token (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create_0'] to see the possible values for this operation * @@ -554,9 +554,9 @@ public function create_0WithHttpInfo($app_id, $event_template_id, $timeline_even * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function create_0Async($app_id, $event_template_id, $timeline_event_template_token, string $contentType = self::contentTypes['create_0'][0]) + public function create_0Async($event_template_id, $app_id, $timeline_event_template_token, string $contentType = self::contentTypes['create_0'][0]) { - return $this->create_0AsyncWithHttpInfo($app_id, $event_template_id, $timeline_event_template_token, $contentType) + return $this->create_0AsyncWithHttpInfo($event_template_id, $app_id, $timeline_event_template_token, $contentType) ->then( function ($response) { return $response[0]; @@ -569,8 +569,8 @@ function ($response) { * * Add tokens to an existing template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken $timeline_event_template_token (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create_0'] to see the possible values for this operation * @@ -578,10 +578,10 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function create_0AsyncWithHttpInfo($app_id, $event_template_id, $timeline_event_template_token, string $contentType = self::contentTypes['create_0'][0]) + public function create_0AsyncWithHttpInfo($event_template_id, $app_id, $timeline_event_template_token, string $contentType = self::contentTypes['create_0'][0]) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken'; - $request = $this->create_0Request($app_id, $event_template_id, $timeline_event_template_token, $contentType); + $request = $this->create_0Request($event_template_id, $app_id, $timeline_event_template_token, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -622,8 +622,8 @@ function ($exception) { /** * Create request for operation 'create_0' * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken $timeline_event_template_token (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create_0'] to see the possible values for this operation * @@ -631,20 +631,20 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function create_0Request($app_id, $event_template_id, $timeline_event_template_token, string $contentType = self::contentTypes['create_0'][0]) + public function create_0Request($event_template_id, $app_id, $timeline_event_template_token, string $contentType = self::contentTypes['create_0'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'event_template_id' is set + if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling create_0' + 'Missing the required parameter $event_template_id when calling create_0' ); } - // verify the required parameter 'event_template_id' is set - if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $event_template_id when calling create_0' + 'Missing the required parameter $app_id when calling create_0' ); } @@ -666,18 +666,18 @@ public function create_0Request($app_id, $event_template_id, $timeline_event_tem // path params - if ($app_id !== null) { + if ($event_template_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'eventTemplateId' . '}', + ObjectSerializer::toPathValue($event_template_id), $resourcePath ); } // path params - if ($event_template_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'eventTemplateId' . '}', - ObjectSerializer::toPathValue($event_template_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } diff --git a/codegen/Crm/Timeline/Api/BasicApi.php b/codegen/Crm/Timeline/Api/BasicApi.php index 83edbd33..0012fb44 100644 --- a/codegen/Crm/Timeline/Api/BasicApi.php +++ b/codegen/Crm/Timeline/Api/BasicApi.php @@ -150,8 +150,8 @@ public function getConfig() * * Delete an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response or if the response body is not in the expected format @@ -159,9 +159,9 @@ public function getConfig() * @return void * @deprecated */ - public function archive($app_id, $event_template_id, string $contentType = self::contentTypes['archive'][0]) + public function archive($event_template_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - $this->archiveWithHttpInfo($app_id, $event_template_id, $contentType); + $this->archiveWithHttpInfo($event_template_id, $app_id, $contentType); } /** @@ -169,8 +169,8 @@ public function archive($app_id, $event_template_id, string $contentType = self: * * Delete an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response or if the response body is not in the expected format @@ -178,9 +178,9 @@ public function archive($app_id, $event_template_id, string $contentType = self: * @return array of null, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function archiveWithHttpInfo($app_id, $event_template_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveWithHttpInfo($event_template_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - $request = $this->archiveRequest($app_id, $event_template_id, $contentType); + $request = $this->archiveRequest($event_template_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -228,17 +228,17 @@ public function archiveWithHttpInfo($app_id, $event_template_id, string $content * * Delete an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function archiveAsync($app_id, $event_template_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsync($event_template_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - return $this->archiveAsyncWithHttpInfo($app_id, $event_template_id, $contentType) + return $this->archiveAsyncWithHttpInfo($event_template_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -251,18 +251,18 @@ function ($response) { * * Delete an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function archiveAsyncWithHttpInfo($app_id, $event_template_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsyncWithHttpInfo($event_template_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { $returnType = ''; - $request = $this->archiveRequest($app_id, $event_template_id, $contentType); + $request = $this->archiveRequest($event_template_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -290,28 +290,28 @@ function ($exception) { /** * Create request for operation 'archive' * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function archiveRequest($app_id, $event_template_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveRequest($event_template_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'event_template_id' is set + if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling archive' + 'Missing the required parameter $event_template_id when calling archive' ); } - // verify the required parameter 'event_template_id' is set - if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $event_template_id when calling archive' + 'Missing the required parameter $app_id when calling archive' ); } @@ -326,18 +326,18 @@ public function archiveRequest($app_id, $event_template_id, string $contentType // path params - if ($app_id !== null) { + if ($event_template_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'eventTemplateId' . '}', + ObjectSerializer::toPathValue($event_template_id), $resourcePath ); } // path params - if ($event_template_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'eventTemplateId' . '}', - ObjectSerializer::toPathValue($event_template_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -406,9 +406,9 @@ public function archiveRequest($app_id, $event_template_id, string $contentType * * Delete a template token * - * @param int $app_id (required) * @param string $event_template_id (required) * @param string $token_name (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive_0'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response or if the response body is not in the expected format @@ -416,9 +416,9 @@ public function archiveRequest($app_id, $event_template_id, string $contentType * @return void * @deprecated */ - public function archive_0($app_id, $event_template_id, $token_name, string $contentType = self::contentTypes['archive_0'][0]) + public function archive_0($event_template_id, $token_name, $app_id, string $contentType = self::contentTypes['archive_0'][0]) { - $this->archive_0WithHttpInfo($app_id, $event_template_id, $token_name, $contentType); + $this->archive_0WithHttpInfo($event_template_id, $token_name, $app_id, $contentType); } /** @@ -426,9 +426,9 @@ public function archive_0($app_id, $event_template_id, $token_name, string $cont * * Delete a template token * - * @param int $app_id (required) * @param string $event_template_id (required) * @param string $token_name (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive_0'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response or if the response body is not in the expected format @@ -436,9 +436,9 @@ public function archive_0($app_id, $event_template_id, $token_name, string $cont * @return array of null, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function archive_0WithHttpInfo($app_id, $event_template_id, $token_name, string $contentType = self::contentTypes['archive_0'][0]) + public function archive_0WithHttpInfo($event_template_id, $token_name, $app_id, string $contentType = self::contentTypes['archive_0'][0]) { - $request = $this->archive_0Request($app_id, $event_template_id, $token_name, $contentType); + $request = $this->archive_0Request($event_template_id, $token_name, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -486,18 +486,18 @@ public function archive_0WithHttpInfo($app_id, $event_template_id, $token_name, * * Delete a template token * - * @param int $app_id (required) * @param string $event_template_id (required) * @param string $token_name (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive_0'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function archive_0Async($app_id, $event_template_id, $token_name, string $contentType = self::contentTypes['archive_0'][0]) + public function archive_0Async($event_template_id, $token_name, $app_id, string $contentType = self::contentTypes['archive_0'][0]) { - return $this->archive_0AsyncWithHttpInfo($app_id, $event_template_id, $token_name, $contentType) + return $this->archive_0AsyncWithHttpInfo($event_template_id, $token_name, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -510,19 +510,19 @@ function ($response) { * * Delete a template token * - * @param int $app_id (required) * @param string $event_template_id (required) * @param string $token_name (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive_0'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function archive_0AsyncWithHttpInfo($app_id, $event_template_id, $token_name, string $contentType = self::contentTypes['archive_0'][0]) + public function archive_0AsyncWithHttpInfo($event_template_id, $token_name, $app_id, string $contentType = self::contentTypes['archive_0'][0]) { $returnType = ''; - $request = $this->archive_0Request($app_id, $event_template_id, $token_name, $contentType); + $request = $this->archive_0Request($event_template_id, $token_name, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -550,25 +550,18 @@ function ($exception) { /** * Create request for operation 'archive_0' * - * @param int $app_id (required) * @param string $event_template_id (required) * @param string $token_name (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive_0'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function archive_0Request($app_id, $event_template_id, $token_name, string $contentType = self::contentTypes['archive_0'][0]) + public function archive_0Request($event_template_id, $token_name, $app_id, string $contentType = self::contentTypes['archive_0'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling archive_0' - ); - } - // verify the required parameter 'event_template_id' is set if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { throw new \InvalidArgumentException( @@ -583,6 +576,13 @@ public function archive_0Request($app_id, $event_template_id, $token_name, strin ); } + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app_id when calling archive_0' + ); + } + $resourcePath = '/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}/tokens/{tokenName}'; $formParams = []; @@ -593,14 +593,6 @@ public function archive_0Request($app_id, $event_template_id, $token_name, strin - // path params - if ($app_id !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), - $resourcePath - ); - } // path params if ($event_template_id !== null) { $resourcePath = str_replace( @@ -617,6 +609,14 @@ public function archive_0Request($app_id, $event_template_id, $token_name, strin $resourcePath ); } + // path params + if ($app_id !== null) { + $resourcePath = str_replace( + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -1285,8 +1285,8 @@ public function getAllRequest($app_id, string $contentType = self::contentTypes[ * * Get an event instance * - * @param string $event_id (required) * @param string $event_template_id (required) + * @param string $event_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response or if the response body is not in the expected format @@ -1294,9 +1294,9 @@ public function getAllRequest($app_id, string $contentType = self::contentTypes[ * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventResponse|\HubSpot\Client\Crm\Timeline\Model\Error * @deprecated */ - public function getById($event_id, $event_template_id, string $contentType = self::contentTypes['getById'][0]) + public function getById($event_template_id, $event_id, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($event_id, $event_template_id, $contentType); + list($response) = $this->getByIdWithHttpInfo($event_template_id, $event_id, $contentType); return $response; } @@ -1305,8 +1305,8 @@ public function getById($event_id, $event_template_id, string $contentType = sel * * Get an event instance * - * @param string $event_id (required) * @param string $event_template_id (required) + * @param string $event_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response or if the response body is not in the expected format @@ -1314,9 +1314,9 @@ public function getById($event_id, $event_template_id, string $contentType = sel * @return array of \HubSpot\Client\Crm\Timeline\Model\TimelineEventResponse|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function getByIdWithHttpInfo($event_id, $event_template_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($event_template_id, $event_id, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($event_id, $event_template_id, $contentType); + $request = $this->getByIdRequest($event_template_id, $event_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1406,17 +1406,17 @@ public function getByIdWithHttpInfo($event_id, $event_template_id, string $conte * * Get an event instance * - * @param string $event_id (required) * @param string $event_template_id (required) + * @param string $event_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function getByIdAsync($event_id, $event_template_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($event_template_id, $event_id, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($event_id, $event_template_id, $contentType) + return $this->getByIdAsyncWithHttpInfo($event_template_id, $event_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1429,18 +1429,18 @@ function ($response) { * * Get an event instance * - * @param string $event_id (required) * @param string $event_template_id (required) + * @param string $event_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function getByIdAsyncWithHttpInfo($event_id, $event_template_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($event_template_id, $event_id, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\TimelineEventResponse'; - $request = $this->getByIdRequest($event_id, $event_template_id, $contentType); + $request = $this->getByIdRequest($event_template_id, $event_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1481,28 +1481,28 @@ function ($exception) { /** * Create request for operation 'getById' * - * @param string $event_id (required) * @param string $event_template_id (required) + * @param string $event_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function getByIdRequest($event_id, $event_template_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($event_template_id, $event_id, string $contentType = self::contentTypes['getById'][0]) { - // verify the required parameter 'event_id' is set - if ($event_id === null || (is_array($event_id) && count($event_id) === 0)) { + // verify the required parameter 'event_template_id' is set + if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $event_id when calling getById' + 'Missing the required parameter $event_template_id when calling getById' ); } - // verify the required parameter 'event_template_id' is set - if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { + // verify the required parameter 'event_id' is set + if ($event_id === null || (is_array($event_id) && count($event_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $event_template_id when calling getById' + 'Missing the required parameter $event_id when calling getById' ); } @@ -1517,18 +1517,18 @@ public function getByIdRequest($event_id, $event_template_id, string $contentTyp // path params - if ($event_id !== null) { + if ($event_template_id !== null) { $resourcePath = str_replace( - '{' . 'eventId' . '}', - ObjectSerializer::toPathValue($event_id), + '{' . 'eventTemplateId' . '}', + ObjectSerializer::toPathValue($event_template_id), $resourcePath ); } // path params - if ($event_template_id !== null) { + if ($event_id !== null) { $resourcePath = str_replace( - '{' . 'eventTemplateId' . '}', - ObjectSerializer::toPathValue($event_template_id), + '{' . 'eventId' . '}', + ObjectSerializer::toPathValue($event_id), $resourcePath ); } @@ -1596,8 +1596,8 @@ public function getByIdRequest($event_id, $event_template_id, string $contentTyp * * Get an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById_0'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response or if the response body is not in the expected format @@ -1605,9 +1605,9 @@ public function getByIdRequest($event_id, $event_template_id, string $contentTyp * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate|\HubSpot\Client\Crm\Timeline\Model\Error * @deprecated */ - public function getById_0($app_id, $event_template_id, string $contentType = self::contentTypes['getById_0'][0]) + public function getById_0($event_template_id, $app_id, string $contentType = self::contentTypes['getById_0'][0]) { - list($response) = $this->getById_0WithHttpInfo($app_id, $event_template_id, $contentType); + list($response) = $this->getById_0WithHttpInfo($event_template_id, $app_id, $contentType); return $response; } @@ -1616,8 +1616,8 @@ public function getById_0($app_id, $event_template_id, string $contentType = sel * * Get an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById_0'] to see the possible values for this operation * * @throws \HubSpot\Client\Crm\Timeline\ApiException on non-2xx response or if the response body is not in the expected format @@ -1625,9 +1625,9 @@ public function getById_0($app_id, $event_template_id, string $contentType = sel * @return array of \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function getById_0WithHttpInfo($app_id, $event_template_id, string $contentType = self::contentTypes['getById_0'][0]) + public function getById_0WithHttpInfo($event_template_id, $app_id, string $contentType = self::contentTypes['getById_0'][0]) { - $request = $this->getById_0Request($app_id, $event_template_id, $contentType); + $request = $this->getById_0Request($event_template_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1717,17 +1717,17 @@ public function getById_0WithHttpInfo($app_id, $event_template_id, string $conte * * Get an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById_0'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function getById_0Async($app_id, $event_template_id, string $contentType = self::contentTypes['getById_0'][0]) + public function getById_0Async($event_template_id, $app_id, string $contentType = self::contentTypes['getById_0'][0]) { - return $this->getById_0AsyncWithHttpInfo($app_id, $event_template_id, $contentType) + return $this->getById_0AsyncWithHttpInfo($event_template_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1740,18 +1740,18 @@ function ($response) { * * Get an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById_0'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function getById_0AsyncWithHttpInfo($app_id, $event_template_id, string $contentType = self::contentTypes['getById_0'][0]) + public function getById_0AsyncWithHttpInfo($event_template_id, $app_id, string $contentType = self::contentTypes['getById_0'][0]) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate'; - $request = $this->getById_0Request($app_id, $event_template_id, $contentType); + $request = $this->getById_0Request($event_template_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1792,28 +1792,28 @@ function ($exception) { /** * Create request for operation 'getById_0' * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById_0'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function getById_0Request($app_id, $event_template_id, string $contentType = self::contentTypes['getById_0'][0]) + public function getById_0Request($event_template_id, $app_id, string $contentType = self::contentTypes['getById_0'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'event_template_id' is set + if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getById_0' + 'Missing the required parameter $event_template_id when calling getById_0' ); } - // verify the required parameter 'event_template_id' is set - if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $event_template_id when calling getById_0' + 'Missing the required parameter $app_id when calling getById_0' ); } @@ -1828,18 +1828,18 @@ public function getById_0Request($app_id, $event_template_id, string $contentTyp // path params - if ($app_id !== null) { + if ($event_template_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'eventTemplateId' . '}', + ObjectSerializer::toPathValue($event_template_id), $resourcePath ); } // path params - if ($event_template_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'eventTemplateId' . '}', - ObjectSerializer::toPathValue($event_template_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -1908,8 +1908,8 @@ public function getById_0Request($app_id, $event_template_id, string $contentTyp * * Update an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateUpdateRequest $timeline_event_template_update_request timeline_event_template_update_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -1918,9 +1918,9 @@ public function getById_0Request($app_id, $event_template_id, string $contentTyp * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate|\HubSpot\Client\Crm\Timeline\Model\Error * @deprecated */ - public function update($app_id, $event_template_id, $timeline_event_template_update_request, string $contentType = self::contentTypes['update'][0]) + public function update($event_template_id, $app_id, $timeline_event_template_update_request, string $contentType = self::contentTypes['update'][0]) { - list($response) = $this->updateWithHttpInfo($app_id, $event_template_id, $timeline_event_template_update_request, $contentType); + list($response) = $this->updateWithHttpInfo($event_template_id, $app_id, $timeline_event_template_update_request, $contentType); return $response; } @@ -1929,8 +1929,8 @@ public function update($app_id, $event_template_id, $timeline_event_template_upd * * Update an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateUpdateRequest $timeline_event_template_update_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -1939,9 +1939,9 @@ public function update($app_id, $event_template_id, $timeline_event_template_upd * @return array of \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function updateWithHttpInfo($app_id, $event_template_id, $timeline_event_template_update_request, string $contentType = self::contentTypes['update'][0]) + public function updateWithHttpInfo($event_template_id, $app_id, $timeline_event_template_update_request, string $contentType = self::contentTypes['update'][0]) { - $request = $this->updateRequest($app_id, $event_template_id, $timeline_event_template_update_request, $contentType); + $request = $this->updateRequest($event_template_id, $app_id, $timeline_event_template_update_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -2031,8 +2031,8 @@ public function updateWithHttpInfo($app_id, $event_template_id, $timeline_event_ * * Update an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateUpdateRequest $timeline_event_template_update_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -2040,9 +2040,9 @@ public function updateWithHttpInfo($app_id, $event_template_id, $timeline_event_ * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function updateAsync($app_id, $event_template_id, $timeline_event_template_update_request, string $contentType = self::contentTypes['update'][0]) + public function updateAsync($event_template_id, $app_id, $timeline_event_template_update_request, string $contentType = self::contentTypes['update'][0]) { - return $this->updateAsyncWithHttpInfo($app_id, $event_template_id, $timeline_event_template_update_request, $contentType) + return $this->updateAsyncWithHttpInfo($event_template_id, $app_id, $timeline_event_template_update_request, $contentType) ->then( function ($response) { return $response[0]; @@ -2055,8 +2055,8 @@ function ($response) { * * Update an event template * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateUpdateRequest $timeline_event_template_update_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -2064,10 +2064,10 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function updateAsyncWithHttpInfo($app_id, $event_template_id, $timeline_event_template_update_request, string $contentType = self::contentTypes['update'][0]) + public function updateAsyncWithHttpInfo($event_template_id, $app_id, $timeline_event_template_update_request, string $contentType = self::contentTypes['update'][0]) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplate'; - $request = $this->updateRequest($app_id, $event_template_id, $timeline_event_template_update_request, $contentType); + $request = $this->updateRequest($event_template_id, $app_id, $timeline_event_template_update_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2108,8 +2108,8 @@ function ($exception) { /** * Create request for operation 'update' * - * @param int $app_id (required) * @param string $event_template_id (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateUpdateRequest $timeline_event_template_update_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -2117,20 +2117,20 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function updateRequest($app_id, $event_template_id, $timeline_event_template_update_request, string $contentType = self::contentTypes['update'][0]) + public function updateRequest($event_template_id, $app_id, $timeline_event_template_update_request, string $contentType = self::contentTypes['update'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'event_template_id' is set + if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling update' + 'Missing the required parameter $event_template_id when calling update' ); } - // verify the required parameter 'event_template_id' is set - if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $event_template_id when calling update' + 'Missing the required parameter $app_id when calling update' ); } @@ -2152,18 +2152,18 @@ public function updateRequest($app_id, $event_template_id, $timeline_event_templ // path params - if ($app_id !== null) { + if ($event_template_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'eventTemplateId' . '}', + ObjectSerializer::toPathValue($event_template_id), $resourcePath ); } // path params - if ($event_template_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'eventTemplateId' . '}', - ObjectSerializer::toPathValue($event_template_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -2239,9 +2239,9 @@ public function updateRequest($app_id, $event_template_id, $timeline_event_templ * * Update a template token * - * @param int $app_id (required) * @param string $event_template_id (required) * @param string $token_name (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenUpdateRequest $timeline_event_template_token_update_request timeline_event_template_token_update_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update_0'] to see the possible values for this operation * @@ -2250,9 +2250,9 @@ public function updateRequest($app_id, $event_template_id, $timeline_event_templ * @return \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken|\HubSpot\Client\Crm\Timeline\Model\Error * @deprecated */ - public function update_0($app_id, $event_template_id, $token_name, $timeline_event_template_token_update_request, string $contentType = self::contentTypes['update_0'][0]) + public function update_0($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request, string $contentType = self::contentTypes['update_0'][0]) { - list($response) = $this->update_0WithHttpInfo($app_id, $event_template_id, $token_name, $timeline_event_template_token_update_request, $contentType); + list($response) = $this->update_0WithHttpInfo($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request, $contentType); return $response; } @@ -2261,9 +2261,9 @@ public function update_0($app_id, $event_template_id, $token_name, $timeline_eve * * Update a template token * - * @param int $app_id (required) * @param string $event_template_id (required) * @param string $token_name (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenUpdateRequest $timeline_event_template_token_update_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update_0'] to see the possible values for this operation * @@ -2272,9 +2272,9 @@ public function update_0($app_id, $event_template_id, $token_name, $timeline_eve * @return array of \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken|\HubSpot\Client\Crm\Timeline\Model\Error, HTTP status code, HTTP response headers (array of strings) * @deprecated */ - public function update_0WithHttpInfo($app_id, $event_template_id, $token_name, $timeline_event_template_token_update_request, string $contentType = self::contentTypes['update_0'][0]) + public function update_0WithHttpInfo($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request, string $contentType = self::contentTypes['update_0'][0]) { - $request = $this->update_0Request($app_id, $event_template_id, $token_name, $timeline_event_template_token_update_request, $contentType); + $request = $this->update_0Request($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -2364,9 +2364,9 @@ public function update_0WithHttpInfo($app_id, $event_template_id, $token_name, $ * * Update a template token * - * @param int $app_id (required) * @param string $event_template_id (required) * @param string $token_name (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenUpdateRequest $timeline_event_template_token_update_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update_0'] to see the possible values for this operation * @@ -2374,9 +2374,9 @@ public function update_0WithHttpInfo($app_id, $event_template_id, $token_name, $ * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function update_0Async($app_id, $event_template_id, $token_name, $timeline_event_template_token_update_request, string $contentType = self::contentTypes['update_0'][0]) + public function update_0Async($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request, string $contentType = self::contentTypes['update_0'][0]) { - return $this->update_0AsyncWithHttpInfo($app_id, $event_template_id, $token_name, $timeline_event_template_token_update_request, $contentType) + return $this->update_0AsyncWithHttpInfo($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request, $contentType) ->then( function ($response) { return $response[0]; @@ -2389,9 +2389,9 @@ function ($response) { * * Update a template token * - * @param int $app_id (required) * @param string $event_template_id (required) * @param string $token_name (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenUpdateRequest $timeline_event_template_token_update_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update_0'] to see the possible values for this operation * @@ -2399,10 +2399,10 @@ function ($response) { * @return \GuzzleHttp\Promise\PromiseInterface * @deprecated */ - public function update_0AsyncWithHttpInfo($app_id, $event_template_id, $token_name, $timeline_event_template_token_update_request, string $contentType = self::contentTypes['update_0'][0]) + public function update_0AsyncWithHttpInfo($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request, string $contentType = self::contentTypes['update_0'][0]) { $returnType = '\HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateToken'; - $request = $this->update_0Request($app_id, $event_template_id, $token_name, $timeline_event_template_token_update_request, $contentType); + $request = $this->update_0Request($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2443,9 +2443,9 @@ function ($exception) { /** * Create request for operation 'update_0' * - * @param int $app_id (required) * @param string $event_template_id (required) * @param string $token_name (required) + * @param int $app_id (required) * @param \HubSpot\Client\Crm\Timeline\Model\TimelineEventTemplateTokenUpdateRequest $timeline_event_template_token_update_request (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update_0'] to see the possible values for this operation * @@ -2453,16 +2453,9 @@ function ($exception) { * @return \GuzzleHttp\Psr7\Request * @deprecated */ - public function update_0Request($app_id, $event_template_id, $token_name, $timeline_event_template_token_update_request, string $contentType = self::contentTypes['update_0'][0]) + public function update_0Request($event_template_id, $token_name, $app_id, $timeline_event_template_token_update_request, string $contentType = self::contentTypes['update_0'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling update_0' - ); - } - // verify the required parameter 'event_template_id' is set if ($event_template_id === null || (is_array($event_template_id) && count($event_template_id) === 0)) { throw new \InvalidArgumentException( @@ -2477,6 +2470,13 @@ public function update_0Request($app_id, $event_template_id, $token_name, $timel ); } + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $app_id when calling update_0' + ); + } + // 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( @@ -2494,14 +2494,6 @@ public function update_0Request($app_id, $event_template_id, $token_name, $timel - // path params - if ($app_id !== null) { - $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), - $resourcePath - ); - } // path params if ($event_template_id !== null) { $resourcePath = str_replace( @@ -2518,6 +2510,14 @@ public function update_0Request($app_id, $event_template_id, $token_name, $timel $resourcePath ); } + // path params + if ($app_id !== null) { + $resourcePath = str_replace( + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( diff --git a/codegen/Events/Api/BasicApi.php b/codegen/Events/Api/BasicApi.php index 42ae912e..23a52289 100644 --- a/codegen/Events/Api/BasicApi.php +++ b/codegen/Events/Api/BasicApi.php @@ -73,10 +73,10 @@ class BasicApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'eventsV3Events' => [ + 'getPage' => [ 'application/json', ], - 'eventsV3EventsEventTypes' => [ + 'getTypes' => [ 'application/json', ], ]; @@ -128,58 +128,58 @@ public function getConfig() } /** - * Operation eventsV3Events + * Operation getPage * + * @param string|null $object_type (optional) + * @param string|null $event_type (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string|null $before (optional) - * @param string|null $event_type (optional) - * @param string[]|null $id (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $object_id (optional) - * @param object|null $object_property_propname (optional) - * @param string|null $object_type (optional) + * @param string[]|null $sort (optional) * @param \DateTime|null $occurred_after (optional) * @param \DateTime|null $occurred_before (optional) - * @param string[]|null $properties (optional) + * @param int|null $object_id (optional) + * @param object|null $object_property_propname (optional) * @param object|null $property_propname (optional) - * @param string[]|null $sort (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['eventsV3Events'] to see the possible values for this operation + * @param string[]|null $id (optional) + * @param string[]|null $properties (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Events\Model\CollectionResponseExternalUnifiedEvent|\HubSpot\Client\Events\Model\Error */ - public function eventsV3Events($after = null, $before = null, $event_type = null, $id = null, $limit = null, $object_id = null, $object_property_propname = null, $object_type = null, $occurred_after = null, $occurred_before = null, $properties = null, $property_propname = null, $sort = null, string $contentType = self::contentTypes['eventsV3Events'][0]) + public function getPage($object_type = null, $event_type = null, $after = null, $before = null, $limit = null, $sort = null, $occurred_after = null, $occurred_before = null, $object_id = null, $object_property_propname = null, $property_propname = null, $id = null, $properties = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->eventsV3EventsWithHttpInfo($after, $before, $event_type, $id, $limit, $object_id, $object_property_propname, $object_type, $occurred_after, $occurred_before, $properties, $property_propname, $sort, $contentType); + list($response) = $this->getPageWithHttpInfo($object_type, $event_type, $after, $before, $limit, $sort, $occurred_after, $occurred_before, $object_id, $object_property_propname, $property_propname, $id, $properties, $contentType); return $response; } /** - * Operation eventsV3EventsWithHttpInfo + * Operation getPageWithHttpInfo * + * @param string|null $object_type (optional) + * @param string|null $event_type (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string|null $before (optional) - * @param string|null $event_type (optional) - * @param string[]|null $id (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $object_id (optional) - * @param object|null $object_property_propname (optional) - * @param string|null $object_type (optional) + * @param string[]|null $sort (optional) * @param \DateTime|null $occurred_after (optional) * @param \DateTime|null $occurred_before (optional) - * @param string[]|null $properties (optional) + * @param int|null $object_id (optional) + * @param object|null $object_property_propname (optional) * @param object|null $property_propname (optional) - * @param string[]|null $sort (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['eventsV3Events'] to see the possible values for this operation + * @param string[]|null $id (optional) + * @param string[]|null $properties (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Events\Model\CollectionResponseExternalUnifiedEvent|\HubSpot\Client\Events\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function eventsV3EventsWithHttpInfo($after = null, $before = null, $event_type = null, $id = null, $limit = null, $object_id = null, $object_property_propname = null, $object_type = null, $occurred_after = null, $occurred_before = null, $properties = null, $property_propname = null, $sort = null, string $contentType = self::contentTypes['eventsV3Events'][0]) + public function getPageWithHttpInfo($object_type = null, $event_type = null, $after = null, $before = null, $limit = null, $sort = null, $occurred_after = null, $occurred_before = null, $object_id = null, $object_property_propname = null, $property_propname = null, $id = null, $properties = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->eventsV3EventsRequest($after, $before, $event_type, $id, $limit, $object_id, $object_property_propname, $object_type, $occurred_after, $occurred_before, $properties, $property_propname, $sort, $contentType); + $request = $this->getPageRequest($object_type, $event_type, $after, $before, $limit, $sort, $occurred_after, $occurred_before, $object_id, $object_property_propname, $property_propname, $id, $properties, $contentType); try { $options = $this->createHttpClientOption(); @@ -265,29 +265,29 @@ public function eventsV3EventsWithHttpInfo($after = null, $before = null, $event } /** - * Operation eventsV3EventsAsync + * Operation getPageAsync * + * @param string|null $object_type (optional) + * @param string|null $event_type (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string|null $before (optional) - * @param string|null $event_type (optional) - * @param string[]|null $id (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $object_id (optional) - * @param object|null $object_property_propname (optional) - * @param string|null $object_type (optional) + * @param string[]|null $sort (optional) * @param \DateTime|null $occurred_after (optional) * @param \DateTime|null $occurred_before (optional) - * @param string[]|null $properties (optional) + * @param int|null $object_id (optional) + * @param object|null $object_property_propname (optional) * @param object|null $property_propname (optional) - * @param string[]|null $sort (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['eventsV3Events'] to see the possible values for this operation + * @param string[]|null $id (optional) + * @param string[]|null $properties (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function eventsV3EventsAsync($after = null, $before = null, $event_type = null, $id = null, $limit = null, $object_id = null, $object_property_propname = null, $object_type = null, $occurred_after = null, $occurred_before = null, $properties = null, $property_propname = null, $sort = null, string $contentType = self::contentTypes['eventsV3Events'][0]) + public function getPageAsync($object_type = null, $event_type = null, $after = null, $before = null, $limit = null, $sort = null, $occurred_after = null, $occurred_before = null, $object_id = null, $object_property_propname = null, $property_propname = null, $id = null, $properties = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->eventsV3EventsAsyncWithHttpInfo($after, $before, $event_type, $id, $limit, $object_id, $object_property_propname, $object_type, $occurred_after, $occurred_before, $properties, $property_propname, $sort, $contentType) + return $this->getPageAsyncWithHttpInfo($object_type, $event_type, $after, $before, $limit, $sort, $occurred_after, $occurred_before, $object_id, $object_property_propname, $property_propname, $id, $properties, $contentType) ->then( function ($response) { return $response[0]; @@ -296,30 +296,30 @@ function ($response) { } /** - * Operation eventsV3EventsAsyncWithHttpInfo + * Operation getPageAsyncWithHttpInfo * + * @param string|null $object_type (optional) + * @param string|null $event_type (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string|null $before (optional) - * @param string|null $event_type (optional) - * @param string[]|null $id (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $object_id (optional) - * @param object|null $object_property_propname (optional) - * @param string|null $object_type (optional) + * @param string[]|null $sort (optional) * @param \DateTime|null $occurred_after (optional) * @param \DateTime|null $occurred_before (optional) - * @param string[]|null $properties (optional) + * @param int|null $object_id (optional) + * @param object|null $object_property_propname (optional) * @param object|null $property_propname (optional) - * @param string[]|null $sort (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['eventsV3Events'] to see the possible values for this operation + * @param string[]|null $id (optional) + * @param string[]|null $properties (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function eventsV3EventsAsyncWithHttpInfo($after = null, $before = null, $event_type = null, $id = null, $limit = null, $object_id = null, $object_property_propname = null, $object_type = null, $occurred_after = null, $occurred_before = null, $properties = null, $property_propname = null, $sort = null, string $contentType = self::contentTypes['eventsV3Events'][0]) + public function getPageAsyncWithHttpInfo($object_type = null, $event_type = null, $after = null, $before = null, $limit = null, $sort = null, $occurred_after = null, $occurred_before = null, $object_id = null, $object_property_propname = null, $property_propname = null, $id = null, $properties = null, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Events\Model\CollectionResponseExternalUnifiedEvent'; - $request = $this->eventsV3EventsRequest($after, $before, $event_type, $id, $limit, $object_id, $object_property_propname, $object_type, $occurred_after, $occurred_before, $properties, $property_propname, $sort, $contentType); + $request = $this->getPageRequest($object_type, $event_type, $after, $before, $limit, $sort, $occurred_after, $occurred_before, $object_id, $object_property_propname, $property_propname, $id, $properties, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -358,27 +358,27 @@ function ($exception) { } /** - * Create request for operation 'eventsV3Events' + * Create request for operation 'getPage' * + * @param string|null $object_type (optional) + * @param string|null $event_type (optional) * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string|null $before (optional) - * @param string|null $event_type (optional) - * @param string[]|null $id (optional) * @param int|null $limit The maximum number of results to display per page. (optional) - * @param int|null $object_id (optional) - * @param object|null $object_property_propname (optional) - * @param string|null $object_type (optional) + * @param string[]|null $sort (optional) * @param \DateTime|null $occurred_after (optional) * @param \DateTime|null $occurred_before (optional) - * @param string[]|null $properties (optional) + * @param int|null $object_id (optional) + * @param object|null $object_property_propname (optional) * @param object|null $property_propname (optional) - * @param string[]|null $sort (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['eventsV3Events'] to see the possible values for this operation + * @param string[]|null $id (optional) + * @param string[]|null $properties (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function eventsV3EventsRequest($after = null, $before = null, $event_type = null, $id = null, $limit = null, $object_id = null, $object_property_propname = null, $object_type = null, $occurred_after = null, $occurred_before = null, $properties = null, $property_propname = null, $sort = null, string $contentType = self::contentTypes['eventsV3Events'][0]) + public function getPageRequest($object_type = null, $event_type = null, $after = null, $before = null, $limit = null, $sort = null, $occurred_after = null, $occurred_before = null, $object_id = null, $object_property_propname = null, $property_propname = null, $id = null, $properties = null, string $contentType = self::contentTypes['getPage'][0]) { @@ -404,8 +404,8 @@ public function eventsV3EventsRequest($after = null, $before = null, $event_type // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $object_type, + 'objectType', // param base name 'string', // openApiType 'form', // style true, // explode @@ -413,8 +413,8 @@ public function eventsV3EventsRequest($after = null, $before = null, $event_type ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $before, - 'before', // param base name + $event_type, + 'eventType', // param base name 'string', // openApiType 'form', // style true, // explode @@ -422,8 +422,8 @@ public function eventsV3EventsRequest($after = null, $before = null, $event_type ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $event_type, - 'eventType', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode @@ -431,9 +431,9 @@ public function eventsV3EventsRequest($after = null, $before = null, $event_type ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id, - 'id', // param base name - 'array', // openApiType + $before, + 'before', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -449,26 +449,26 @@ public function eventsV3EventsRequest($after = null, $before = null, $event_type ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $object_id, - 'objectId', // param base name - 'integer', // openApiType + $sort, + 'sort', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $object_property_propname, - 'objectProperty.{propname}', // param base name - 'object', // openApiType + $occurred_after, + 'occurredAfter', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $object_type, - 'objectType', // param base name + $occurred_before, + 'occurredBefore', // param base name 'string', // openApiType 'form', // style true, // explode @@ -476,44 +476,44 @@ public function eventsV3EventsRequest($after = null, $before = null, $event_type ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $occurred_after, - 'occurredAfter', // param base name - 'string', // openApiType + $object_id, + 'objectId', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $occurred_before, - 'occurredBefore', // param base name - 'string', // openApiType + $object_property_propname, + 'objectProperty.{propname}', // param base name + 'object', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $property_propname, + 'property.{propname}', // param base name + 'object', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $property_propname, - 'property.{propname}', // param base name - 'object', // openApiType + $id, + 'id', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -581,32 +581,32 @@ public function eventsV3EventsRequest($after = null, $before = null, $event_type } /** - * Operation eventsV3EventsEventTypes + * Operation getTypes * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['eventsV3EventsEventTypes'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTypes'] to see the possible values for this operation * * @throws \HubSpot\Client\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Events\Model\VisibleExternalEventTypeNames|\HubSpot\Client\Events\Model\Error */ - public function eventsV3EventsEventTypes(string $contentType = self::contentTypes['eventsV3EventsEventTypes'][0]) + public function getTypes(string $contentType = self::contentTypes['getTypes'][0]) { - list($response) = $this->eventsV3EventsEventTypesWithHttpInfo($contentType); + list($response) = $this->getTypesWithHttpInfo($contentType); return $response; } /** - * Operation eventsV3EventsEventTypesWithHttpInfo + * Operation getTypesWithHttpInfo * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['eventsV3EventsEventTypes'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTypes'] to see the possible values for this operation * * @throws \HubSpot\Client\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Events\Model\VisibleExternalEventTypeNames|\HubSpot\Client\Events\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function eventsV3EventsEventTypesWithHttpInfo(string $contentType = self::contentTypes['eventsV3EventsEventTypes'][0]) + public function getTypesWithHttpInfo(string $contentType = self::contentTypes['getTypes'][0]) { - $request = $this->eventsV3EventsEventTypesRequest($contentType); + $request = $this->getTypesRequest($contentType); try { $options = $this->createHttpClientOption(); @@ -692,16 +692,16 @@ public function eventsV3EventsEventTypesWithHttpInfo(string $contentType = self: } /** - * Operation eventsV3EventsEventTypesAsync + * Operation getTypesAsync * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['eventsV3EventsEventTypes'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTypes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function eventsV3EventsEventTypesAsync(string $contentType = self::contentTypes['eventsV3EventsEventTypes'][0]) + public function getTypesAsync(string $contentType = self::contentTypes['getTypes'][0]) { - return $this->eventsV3EventsEventTypesAsyncWithHttpInfo($contentType) + return $this->getTypesAsyncWithHttpInfo($contentType) ->then( function ($response) { return $response[0]; @@ -710,17 +710,17 @@ function ($response) { } /** - * Operation eventsV3EventsEventTypesAsyncWithHttpInfo + * Operation getTypesAsyncWithHttpInfo * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['eventsV3EventsEventTypes'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTypes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function eventsV3EventsEventTypesAsyncWithHttpInfo(string $contentType = self::contentTypes['eventsV3EventsEventTypes'][0]) + public function getTypesAsyncWithHttpInfo(string $contentType = self::contentTypes['getTypes'][0]) { $returnType = '\HubSpot\Client\Events\Model\VisibleExternalEventTypeNames'; - $request = $this->eventsV3EventsEventTypesRequest($contentType); + $request = $this->getTypesRequest($contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -759,14 +759,14 @@ function ($exception) { } /** - * Create request for operation 'eventsV3EventsEventTypes' + * Create request for operation 'getTypes' * - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['eventsV3EventsEventTypes'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTypes'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function eventsV3EventsEventTypesRequest(string $contentType = self::contentTypes['eventsV3EventsEventTypes'][0]) + public function getTypesRequest(string $contentType = self::contentTypes['getTypes'][0]) { diff --git a/codegen/Files/Api/BasicApi.php b/codegen/Files/Api/BasicApi.php index ba393b5c..07870fff 100644 --- a/codegen/Files/Api/BasicApi.php +++ b/codegen/Files/Api/BasicApi.php @@ -73,7 +73,7 @@ class BasicApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'filesV3FilesFileIdDownload' => [ + 'download' => [ 'application/json', ], ]; @@ -125,34 +125,34 @@ public function getConfig() } /** - * Operation filesV3FilesFileIdDownload + * Operation download * * @param string $file_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['filesV3FilesFileIdDownload'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['download'] to see the possible values for this operation * * @throws \HubSpot\Client\Files\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Files\Model\Error */ - public function filesV3FilesFileIdDownload($file_id, string $contentType = self::contentTypes['filesV3FilesFileIdDownload'][0]) + public function download($file_id, string $contentType = self::contentTypes['download'][0]) { - list($response) = $this->filesV3FilesFileIdDownloadWithHttpInfo($file_id, $contentType); + list($response) = $this->downloadWithHttpInfo($file_id, $contentType); return $response; } /** - * Operation filesV3FilesFileIdDownloadWithHttpInfo + * Operation downloadWithHttpInfo * * @param string $file_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['filesV3FilesFileIdDownload'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['download'] to see the possible values for this operation * * @throws \HubSpot\Client\Files\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Files\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function filesV3FilesFileIdDownloadWithHttpInfo($file_id, string $contentType = self::contentTypes['filesV3FilesFileIdDownload'][0]) + public function downloadWithHttpInfo($file_id, string $contentType = self::contentTypes['download'][0]) { - $request = $this->filesV3FilesFileIdDownloadRequest($file_id, $contentType); + $request = $this->downloadRequest($file_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -224,17 +224,17 @@ public function filesV3FilesFileIdDownloadWithHttpInfo($file_id, string $content } /** - * Operation filesV3FilesFileIdDownloadAsync + * Operation downloadAsync * * @param string $file_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['filesV3FilesFileIdDownload'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['download'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function filesV3FilesFileIdDownloadAsync($file_id, string $contentType = self::contentTypes['filesV3FilesFileIdDownload'][0]) + public function downloadAsync($file_id, string $contentType = self::contentTypes['download'][0]) { - return $this->filesV3FilesFileIdDownloadAsyncWithHttpInfo($file_id, $contentType) + return $this->downloadAsyncWithHttpInfo($file_id, $contentType) ->then( function ($response) { return $response[0]; @@ -243,18 +243,18 @@ function ($response) { } /** - * Operation filesV3FilesFileIdDownloadAsyncWithHttpInfo + * Operation downloadAsyncWithHttpInfo * * @param string $file_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['filesV3FilesFileIdDownload'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['download'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function filesV3FilesFileIdDownloadAsyncWithHttpInfo($file_id, string $contentType = self::contentTypes['filesV3FilesFileIdDownload'][0]) + public function downloadAsyncWithHttpInfo($file_id, string $contentType = self::contentTypes['download'][0]) { $returnType = '\HubSpot\Client\Files\Model\Error'; - $request = $this->filesV3FilesFileIdDownloadRequest($file_id, $contentType); + $request = $this->downloadRequest($file_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -293,25 +293,25 @@ function ($exception) { } /** - * Create request for operation 'filesV3FilesFileIdDownload' + * Create request for operation 'download' * * @param string $file_id (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['filesV3FilesFileIdDownload'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['download'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function filesV3FilesFileIdDownloadRequest($file_id, string $contentType = self::contentTypes['filesV3FilesFileIdDownload'][0]) + public function downloadRequest($file_id, string $contentType = self::contentTypes['download'][0]) { // verify the required parameter 'file_id' is set if ($file_id === null || (is_array($file_id) && count($file_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $file_id when calling filesV3FilesFileIdDownload' + 'Missing the required parameter $file_id when calling download' ); } if (!preg_match("/\\d+/", $file_id)) { - throw new \InvalidArgumentException("invalid value for \"file_id\" when calling BasicApi.filesV3FilesFileIdDownload, must conform to the pattern /\\d+/."); + throw new \InvalidArgumentException("invalid value for \"file_id\" when calling BasicApi.download, must conform to the pattern /\\d+/."); } diff --git a/codegen/Files/Api/FilesApi.php b/codegen/Files/Api/FilesApi.php index 6e4573e2..b93bf326 100644 --- a/codegen/Files/Api/FilesApi.php +++ b/codegen/Files/Api/FilesApi.php @@ -1199,51 +1199,51 @@ public function deleteRequest($file_id, string $contentType = self::contentTypes * * Search files * + * @param string[]|null $properties Desired file properties in the return object. (optional) * @param string|null $after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit. (optional) - * @param bool|null $allows_anonymous_access Search files by access. If 'true' will show only public files; if 'false' will show only private files (optional) * @param string|null $before Search files updated before this timestamp. Time must be epoch time in milliseconds. (optional) + * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) + * @param string[]|null $sort Sort files by a given field. (optional) + * @param int[]|null $ids (optional) + * @param int|null $id_lte Search files by less than or equal to ID. Can be used with idGte to create a range. (optional) + * @param int|null $id_gte Search files by greater than or equal to ID. Can be used with idLte to create a range. (optional) * @param \DateTime|null $created_at Search files by exact time of creation. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at_gte Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) * @param \DateTime|null $created_at_lte Search files by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) - * @param string|null $encoding Search files by specified encoding. (optional) - * @param \DateTime|null $expires_at Search files by exact expires time. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $expires_at_gte Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range. (optional) - * @param \DateTime|null $expires_at_lte Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range. (optional) - * @param string|null $extension Search files by given extension. (optional) - * @param string|null $file_md5 Search files by specific md5 hash. (optional) - * @param int|null $height Search files by height of image or video. (optional) - * @param int|null $height_gte Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range. (optional) - * @param int|null $height_lte Search files by less than or equal to height of image or video. Can be used with heightGte to create a range. (optional) - * @param int|null $id_gte Search files by greater than or equal to ID. Can be used with idLte to create a range. (optional) - * @param int|null $id_lte Search files by less than or equal to ID. Can be used with idGte to create a range. (optional) - * @param int[]|null $ids (optional) - * @param bool|null $is_usable_in_content If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content. (optional) - * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) + * @param \DateTime|null $created_at_gte Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) + * @param \DateTime|null $updated_at Search files by exact time of latest updated. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $updated_at_lte Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) + * @param \DateTime|null $updated_at_gte Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) * @param string|null $name Search for files containing the given name. (optional) - * @param int[]|null $parent_folder_ids (optional) * @param string|null $path Search files by path. (optional) - * @param string[]|null $properties Desired file properties in the return object. (optional) + * @param int[]|null $parent_folder_ids (optional) * @param int|null $size Search files by exact file size in bytes. (optional) - * @param int|null $size_gte Search files by greater than or equal to file size. Can be used with sizeLte to create a range. (optional) * @param int|null $size_lte Search files by less than or equal to file size. Can be used with sizeGte to create a range. (optional) - * @param string[]|null $sort Sort files by a given field. (optional) - * @param string|null $type Search files by file type. (optional) - * @param \DateTime|null $updated_at Search files by exact time of latest updated. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $updated_at_gte Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) - * @param \DateTime|null $updated_at_lte Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) - * @param string|null $url Search for given URL (optional) + * @param int|null $size_gte Search files by greater than or equal to file size. Can be used with sizeLte to create a range. (optional) + * @param int|null $height Search files by height of image or video. (optional) + * @param int|null $height_lte Search files by less than or equal to height of image or video. Can be used with heightGte to create a range. (optional) + * @param int|null $height_gte Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range. (optional) * @param int|null $width Search files by width of image or video. (optional) - * @param int|null $width_gte Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range. (optional) * @param int|null $width_lte Search files by less than or equal to width of image or video. Can be used with widthGte to create a range. (optional) + * @param int|null $width_gte Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range. (optional) + * @param string|null $encoding Search files by specified encoding. (optional) + * @param string|null $type Search files by file type. (optional) + * @param string|null $extension Search files by given extension. (optional) + * @param string|null $url Search for given URL (optional) + * @param bool|null $is_usable_in_content If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content. (optional) + * @param bool|null $allows_anonymous_access Search files by access. If 'true' will show only public files; if 'false' will show only private files (optional) + * @param string|null $file_md5 Search files by specific md5 hash. (optional) + * @param \DateTime|null $expires_at Search files by exact expires time. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $expires_at_lte Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range. (optional) + * @param \DateTime|null $expires_at_gte Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \HubSpot\Client\Files\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Files\Model\CollectionResponseFile|\HubSpot\Client\Files\Model\Error */ - public function doSearch($after = null, $allows_anonymous_access = null, $before = null, $created_at = null, $created_at_gte = null, $created_at_lte = null, $encoding = null, $expires_at = null, $expires_at_gte = null, $expires_at_lte = null, $extension = null, $file_md5 = null, $height = null, $height_gte = null, $height_lte = null, $id_gte = null, $id_lte = null, $ids = null, $is_usable_in_content = null, $limit = null, $name = null, $parent_folder_ids = null, $path = null, $properties = null, $size = null, $size_gte = null, $size_lte = null, $sort = null, $type = null, $updated_at = null, $updated_at_gte = null, $updated_at_lte = null, $url = null, $width = null, $width_gte = null, $width_lte = null, string $contentType = self::contentTypes['doSearch'][0]) + public function doSearch($properties = null, $after = null, $before = null, $limit = null, $sort = null, $ids = null, $id_lte = null, $id_gte = null, $created_at = null, $created_at_lte = null, $created_at_gte = null, $updated_at = null, $updated_at_lte = null, $updated_at_gte = null, $name = null, $path = null, $parent_folder_ids = null, $size = null, $size_lte = null, $size_gte = null, $height = null, $height_lte = null, $height_gte = null, $width = null, $width_lte = null, $width_gte = null, $encoding = null, $type = null, $extension = null, $url = null, $is_usable_in_content = null, $allows_anonymous_access = null, $file_md5 = null, $expires_at = null, $expires_at_lte = null, $expires_at_gte = null, string $contentType = self::contentTypes['doSearch'][0]) { - list($response) = $this->doSearchWithHttpInfo($after, $allows_anonymous_access, $before, $created_at, $created_at_gte, $created_at_lte, $encoding, $expires_at, $expires_at_gte, $expires_at_lte, $extension, $file_md5, $height, $height_gte, $height_lte, $id_gte, $id_lte, $ids, $is_usable_in_content, $limit, $name, $parent_folder_ids, $path, $properties, $size, $size_gte, $size_lte, $sort, $type, $updated_at, $updated_at_gte, $updated_at_lte, $url, $width, $width_gte, $width_lte, $contentType); + list($response) = $this->doSearchWithHttpInfo($properties, $after, $before, $limit, $sort, $ids, $id_lte, $id_gte, $created_at, $created_at_lte, $created_at_gte, $updated_at, $updated_at_lte, $updated_at_gte, $name, $path, $parent_folder_ids, $size, $size_lte, $size_gte, $height, $height_lte, $height_gte, $width, $width_lte, $width_gte, $encoding, $type, $extension, $url, $is_usable_in_content, $allows_anonymous_access, $file_md5, $expires_at, $expires_at_lte, $expires_at_gte, $contentType); return $response; } @@ -1252,51 +1252,51 @@ public function doSearch($after = null, $allows_anonymous_access = null, $before * * Search files * + * @param string[]|null $properties Desired file properties in the return object. (optional) * @param string|null $after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit. (optional) - * @param bool|null $allows_anonymous_access Search files by access. If 'true' will show only public files; if 'false' will show only private files (optional) * @param string|null $before Search files updated before this timestamp. Time must be epoch time in milliseconds. (optional) + * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) + * @param string[]|null $sort Sort files by a given field. (optional) + * @param int[]|null $ids (optional) + * @param int|null $id_lte Search files by less than or equal to ID. Can be used with idGte to create a range. (optional) + * @param int|null $id_gte Search files by greater than or equal to ID. Can be used with idLte to create a range. (optional) * @param \DateTime|null $created_at Search files by exact time of creation. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at_gte Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) * @param \DateTime|null $created_at_lte Search files by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) - * @param string|null $encoding Search files by specified encoding. (optional) - * @param \DateTime|null $expires_at Search files by exact expires time. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $expires_at_gte Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range. (optional) - * @param \DateTime|null $expires_at_lte Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range. (optional) - * @param string|null $extension Search files by given extension. (optional) - * @param string|null $file_md5 Search files by specific md5 hash. (optional) - * @param int|null $height Search files by height of image or video. (optional) - * @param int|null $height_gte Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range. (optional) - * @param int|null $height_lte Search files by less than or equal to height of image or video. Can be used with heightGte to create a range. (optional) - * @param int|null $id_gte Search files by greater than or equal to ID. Can be used with idLte to create a range. (optional) - * @param int|null $id_lte Search files by less than or equal to ID. Can be used with idGte to create a range. (optional) - * @param int[]|null $ids (optional) - * @param bool|null $is_usable_in_content If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content. (optional) - * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) + * @param \DateTime|null $created_at_gte Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) + * @param \DateTime|null $updated_at Search files by exact time of latest updated. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $updated_at_lte Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) + * @param \DateTime|null $updated_at_gte Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) * @param string|null $name Search for files containing the given name. (optional) - * @param int[]|null $parent_folder_ids (optional) * @param string|null $path Search files by path. (optional) - * @param string[]|null $properties Desired file properties in the return object. (optional) + * @param int[]|null $parent_folder_ids (optional) * @param int|null $size Search files by exact file size in bytes. (optional) - * @param int|null $size_gte Search files by greater than or equal to file size. Can be used with sizeLte to create a range. (optional) * @param int|null $size_lte Search files by less than or equal to file size. Can be used with sizeGte to create a range. (optional) - * @param string[]|null $sort Sort files by a given field. (optional) - * @param string|null $type Search files by file type. (optional) - * @param \DateTime|null $updated_at Search files by exact time of latest updated. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $updated_at_gte Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) - * @param \DateTime|null $updated_at_lte Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) - * @param string|null $url Search for given URL (optional) + * @param int|null $size_gte Search files by greater than or equal to file size. Can be used with sizeLte to create a range. (optional) + * @param int|null $height Search files by height of image or video. (optional) + * @param int|null $height_lte Search files by less than or equal to height of image or video. Can be used with heightGte to create a range. (optional) + * @param int|null $height_gte Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range. (optional) * @param int|null $width Search files by width of image or video. (optional) - * @param int|null $width_gte Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range. (optional) * @param int|null $width_lte Search files by less than or equal to width of image or video. Can be used with widthGte to create a range. (optional) + * @param int|null $width_gte Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range. (optional) + * @param string|null $encoding Search files by specified encoding. (optional) + * @param string|null $type Search files by file type. (optional) + * @param string|null $extension Search files by given extension. (optional) + * @param string|null $url Search for given URL (optional) + * @param bool|null $is_usable_in_content If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content. (optional) + * @param bool|null $allows_anonymous_access Search files by access. If 'true' will show only public files; if 'false' will show only private files (optional) + * @param string|null $file_md5 Search files by specific md5 hash. (optional) + * @param \DateTime|null $expires_at Search files by exact expires time. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $expires_at_lte Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range. (optional) + * @param \DateTime|null $expires_at_gte Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \HubSpot\Client\Files\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Files\Model\CollectionResponseFile|\HubSpot\Client\Files\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function doSearchWithHttpInfo($after = null, $allows_anonymous_access = null, $before = null, $created_at = null, $created_at_gte = null, $created_at_lte = null, $encoding = null, $expires_at = null, $expires_at_gte = null, $expires_at_lte = null, $extension = null, $file_md5 = null, $height = null, $height_gte = null, $height_lte = null, $id_gte = null, $id_lte = null, $ids = null, $is_usable_in_content = null, $limit = null, $name = null, $parent_folder_ids = null, $path = null, $properties = null, $size = null, $size_gte = null, $size_lte = null, $sort = null, $type = null, $updated_at = null, $updated_at_gte = null, $updated_at_lte = null, $url = null, $width = null, $width_gte = null, $width_lte = null, string $contentType = self::contentTypes['doSearch'][0]) + public function doSearchWithHttpInfo($properties = null, $after = null, $before = null, $limit = null, $sort = null, $ids = null, $id_lte = null, $id_gte = null, $created_at = null, $created_at_lte = null, $created_at_gte = null, $updated_at = null, $updated_at_lte = null, $updated_at_gte = null, $name = null, $path = null, $parent_folder_ids = null, $size = null, $size_lte = null, $size_gte = null, $height = null, $height_lte = null, $height_gte = null, $width = null, $width_lte = null, $width_gte = null, $encoding = null, $type = null, $extension = null, $url = null, $is_usable_in_content = null, $allows_anonymous_access = null, $file_md5 = null, $expires_at = null, $expires_at_lte = null, $expires_at_gte = null, string $contentType = self::contentTypes['doSearch'][0]) { - $request = $this->doSearchRequest($after, $allows_anonymous_access, $before, $created_at, $created_at_gte, $created_at_lte, $encoding, $expires_at, $expires_at_gte, $expires_at_lte, $extension, $file_md5, $height, $height_gte, $height_lte, $id_gte, $id_lte, $ids, $is_usable_in_content, $limit, $name, $parent_folder_ids, $path, $properties, $size, $size_gte, $size_lte, $sort, $type, $updated_at, $updated_at_gte, $updated_at_lte, $url, $width, $width_gte, $width_lte, $contentType); + $request = $this->doSearchRequest($properties, $after, $before, $limit, $sort, $ids, $id_lte, $id_gte, $created_at, $created_at_lte, $created_at_gte, $updated_at, $updated_at_lte, $updated_at_gte, $name, $path, $parent_folder_ids, $size, $size_lte, $size_gte, $height, $height_lte, $height_gte, $width, $width_lte, $width_gte, $encoding, $type, $extension, $url, $is_usable_in_content, $allows_anonymous_access, $file_md5, $expires_at, $expires_at_lte, $expires_at_gte, $contentType); try { $options = $this->createHttpClientOption(); @@ -1386,50 +1386,50 @@ public function doSearchWithHttpInfo($after = null, $allows_anonymous_access = n * * Search files * + * @param string[]|null $properties Desired file properties in the return object. (optional) * @param string|null $after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit. (optional) - * @param bool|null $allows_anonymous_access Search files by access. If 'true' will show only public files; if 'false' will show only private files (optional) * @param string|null $before Search files updated before this timestamp. Time must be epoch time in milliseconds. (optional) + * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) + * @param string[]|null $sort Sort files by a given field. (optional) + * @param int[]|null $ids (optional) + * @param int|null $id_lte Search files by less than or equal to ID. Can be used with idGte to create a range. (optional) + * @param int|null $id_gte Search files by greater than or equal to ID. Can be used with idLte to create a range. (optional) * @param \DateTime|null $created_at Search files by exact time of creation. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at_gte Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) * @param \DateTime|null $created_at_lte Search files by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) - * @param string|null $encoding Search files by specified encoding. (optional) - * @param \DateTime|null $expires_at Search files by exact expires time. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $expires_at_gte Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range. (optional) - * @param \DateTime|null $expires_at_lte Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range. (optional) - * @param string|null $extension Search files by given extension. (optional) - * @param string|null $file_md5 Search files by specific md5 hash. (optional) - * @param int|null $height Search files by height of image or video. (optional) - * @param int|null $height_gte Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range. (optional) - * @param int|null $height_lte Search files by less than or equal to height of image or video. Can be used with heightGte to create a range. (optional) - * @param int|null $id_gte Search files by greater than or equal to ID. Can be used with idLte to create a range. (optional) - * @param int|null $id_lte Search files by less than or equal to ID. Can be used with idGte to create a range. (optional) - * @param int[]|null $ids (optional) - * @param bool|null $is_usable_in_content If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content. (optional) - * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) + * @param \DateTime|null $created_at_gte Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) + * @param \DateTime|null $updated_at Search files by exact time of latest updated. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $updated_at_lte Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) + * @param \DateTime|null $updated_at_gte Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) * @param string|null $name Search for files containing the given name. (optional) - * @param int[]|null $parent_folder_ids (optional) * @param string|null $path Search files by path. (optional) - * @param string[]|null $properties Desired file properties in the return object. (optional) + * @param int[]|null $parent_folder_ids (optional) * @param int|null $size Search files by exact file size in bytes. (optional) - * @param int|null $size_gte Search files by greater than or equal to file size. Can be used with sizeLte to create a range. (optional) * @param int|null $size_lte Search files by less than or equal to file size. Can be used with sizeGte to create a range. (optional) - * @param string[]|null $sort Sort files by a given field. (optional) - * @param string|null $type Search files by file type. (optional) - * @param \DateTime|null $updated_at Search files by exact time of latest updated. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $updated_at_gte Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) - * @param \DateTime|null $updated_at_lte Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) - * @param string|null $url Search for given URL (optional) + * @param int|null $size_gte Search files by greater than or equal to file size. Can be used with sizeLte to create a range. (optional) + * @param int|null $height Search files by height of image or video. (optional) + * @param int|null $height_lte Search files by less than or equal to height of image or video. Can be used with heightGte to create a range. (optional) + * @param int|null $height_gte Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range. (optional) * @param int|null $width Search files by width of image or video. (optional) - * @param int|null $width_gte Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range. (optional) * @param int|null $width_lte Search files by less than or equal to width of image or video. Can be used with widthGte to create a range. (optional) + * @param int|null $width_gte Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range. (optional) + * @param string|null $encoding Search files by specified encoding. (optional) + * @param string|null $type Search files by file type. (optional) + * @param string|null $extension Search files by given extension. (optional) + * @param string|null $url Search for given URL (optional) + * @param bool|null $is_usable_in_content If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content. (optional) + * @param bool|null $allows_anonymous_access Search files by access. If 'true' will show only public files; if 'false' will show only private files (optional) + * @param string|null $file_md5 Search files by specific md5 hash. (optional) + * @param \DateTime|null $expires_at Search files by exact expires time. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $expires_at_lte Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range. (optional) + * @param \DateTime|null $expires_at_gte Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function doSearchAsync($after = null, $allows_anonymous_access = null, $before = null, $created_at = null, $created_at_gte = null, $created_at_lte = null, $encoding = null, $expires_at = null, $expires_at_gte = null, $expires_at_lte = null, $extension = null, $file_md5 = null, $height = null, $height_gte = null, $height_lte = null, $id_gte = null, $id_lte = null, $ids = null, $is_usable_in_content = null, $limit = null, $name = null, $parent_folder_ids = null, $path = null, $properties = null, $size = null, $size_gte = null, $size_lte = null, $sort = null, $type = null, $updated_at = null, $updated_at_gte = null, $updated_at_lte = null, $url = null, $width = null, $width_gte = null, $width_lte = null, string $contentType = self::contentTypes['doSearch'][0]) + public function doSearchAsync($properties = null, $after = null, $before = null, $limit = null, $sort = null, $ids = null, $id_lte = null, $id_gte = null, $created_at = null, $created_at_lte = null, $created_at_gte = null, $updated_at = null, $updated_at_lte = null, $updated_at_gte = null, $name = null, $path = null, $parent_folder_ids = null, $size = null, $size_lte = null, $size_gte = null, $height = null, $height_lte = null, $height_gte = null, $width = null, $width_lte = null, $width_gte = null, $encoding = null, $type = null, $extension = null, $url = null, $is_usable_in_content = null, $allows_anonymous_access = null, $file_md5 = null, $expires_at = null, $expires_at_lte = null, $expires_at_gte = null, string $contentType = self::contentTypes['doSearch'][0]) { - return $this->doSearchAsyncWithHttpInfo($after, $allows_anonymous_access, $before, $created_at, $created_at_gte, $created_at_lte, $encoding, $expires_at, $expires_at_gte, $expires_at_lte, $extension, $file_md5, $height, $height_gte, $height_lte, $id_gte, $id_lte, $ids, $is_usable_in_content, $limit, $name, $parent_folder_ids, $path, $properties, $size, $size_gte, $size_lte, $sort, $type, $updated_at, $updated_at_gte, $updated_at_lte, $url, $width, $width_gte, $width_lte, $contentType) + return $this->doSearchAsyncWithHttpInfo($properties, $after, $before, $limit, $sort, $ids, $id_lte, $id_gte, $created_at, $created_at_lte, $created_at_gte, $updated_at, $updated_at_lte, $updated_at_gte, $name, $path, $parent_folder_ids, $size, $size_lte, $size_gte, $height, $height_lte, $height_gte, $width, $width_lte, $width_gte, $encoding, $type, $extension, $url, $is_usable_in_content, $allows_anonymous_access, $file_md5, $expires_at, $expires_at_lte, $expires_at_gte, $contentType) ->then( function ($response) { return $response[0]; @@ -1442,51 +1442,51 @@ function ($response) { * * Search files * + * @param string[]|null $properties Desired file properties in the return object. (optional) * @param string|null $after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit. (optional) - * @param bool|null $allows_anonymous_access Search files by access. If 'true' will show only public files; if 'false' will show only private files (optional) * @param string|null $before Search files updated before this timestamp. Time must be epoch time in milliseconds. (optional) + * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) + * @param string[]|null $sort Sort files by a given field. (optional) + * @param int[]|null $ids (optional) + * @param int|null $id_lte Search files by less than or equal to ID. Can be used with idGte to create a range. (optional) + * @param int|null $id_gte Search files by greater than or equal to ID. Can be used with idLte to create a range. (optional) * @param \DateTime|null $created_at Search files by exact time of creation. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at_gte Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) * @param \DateTime|null $created_at_lte Search files by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) - * @param string|null $encoding Search files by specified encoding. (optional) - * @param \DateTime|null $expires_at Search files by exact expires time. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $expires_at_gte Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range. (optional) - * @param \DateTime|null $expires_at_lte Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range. (optional) - * @param string|null $extension Search files by given extension. (optional) - * @param string|null $file_md5 Search files by specific md5 hash. (optional) - * @param int|null $height Search files by height of image or video. (optional) - * @param int|null $height_gte Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range. (optional) - * @param int|null $height_lte Search files by less than or equal to height of image or video. Can be used with heightGte to create a range. (optional) - * @param int|null $id_gte Search files by greater than or equal to ID. Can be used with idLte to create a range. (optional) - * @param int|null $id_lte Search files by less than or equal to ID. Can be used with idGte to create a range. (optional) - * @param int[]|null $ids (optional) - * @param bool|null $is_usable_in_content If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content. (optional) - * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) + * @param \DateTime|null $created_at_gte Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) + * @param \DateTime|null $updated_at Search files by exact time of latest updated. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $updated_at_lte Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) + * @param \DateTime|null $updated_at_gte Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) * @param string|null $name Search for files containing the given name. (optional) - * @param int[]|null $parent_folder_ids (optional) * @param string|null $path Search files by path. (optional) - * @param string[]|null $properties Desired file properties in the return object. (optional) + * @param int[]|null $parent_folder_ids (optional) * @param int|null $size Search files by exact file size in bytes. (optional) - * @param int|null $size_gte Search files by greater than or equal to file size. Can be used with sizeLte to create a range. (optional) * @param int|null $size_lte Search files by less than or equal to file size. Can be used with sizeGte to create a range. (optional) - * @param string[]|null $sort Sort files by a given field. (optional) - * @param string|null $type Search files by file type. (optional) - * @param \DateTime|null $updated_at Search files by exact time of latest updated. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $updated_at_gte Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) - * @param \DateTime|null $updated_at_lte Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) - * @param string|null $url Search for given URL (optional) + * @param int|null $size_gte Search files by greater than or equal to file size. Can be used with sizeLte to create a range. (optional) + * @param int|null $height Search files by height of image or video. (optional) + * @param int|null $height_lte Search files by less than or equal to height of image or video. Can be used with heightGte to create a range. (optional) + * @param int|null $height_gte Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range. (optional) * @param int|null $width Search files by width of image or video. (optional) - * @param int|null $width_gte Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range. (optional) * @param int|null $width_lte Search files by less than or equal to width of image or video. Can be used with widthGte to create a range. (optional) + * @param int|null $width_gte Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range. (optional) + * @param string|null $encoding Search files by specified encoding. (optional) + * @param string|null $type Search files by file type. (optional) + * @param string|null $extension Search files by given extension. (optional) + * @param string|null $url Search for given URL (optional) + * @param bool|null $is_usable_in_content If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content. (optional) + * @param bool|null $allows_anonymous_access Search files by access. If 'true' will show only public files; if 'false' will show only private files (optional) + * @param string|null $file_md5 Search files by specific md5 hash. (optional) + * @param \DateTime|null $expires_at Search files by exact expires time. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $expires_at_lte Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range. (optional) + * @param \DateTime|null $expires_at_gte Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function doSearchAsyncWithHttpInfo($after = null, $allows_anonymous_access = null, $before = null, $created_at = null, $created_at_gte = null, $created_at_lte = null, $encoding = null, $expires_at = null, $expires_at_gte = null, $expires_at_lte = null, $extension = null, $file_md5 = null, $height = null, $height_gte = null, $height_lte = null, $id_gte = null, $id_lte = null, $ids = null, $is_usable_in_content = null, $limit = null, $name = null, $parent_folder_ids = null, $path = null, $properties = null, $size = null, $size_gte = null, $size_lte = null, $sort = null, $type = null, $updated_at = null, $updated_at_gte = null, $updated_at_lte = null, $url = null, $width = null, $width_gte = null, $width_lte = null, string $contentType = self::contentTypes['doSearch'][0]) + public function doSearchAsyncWithHttpInfo($properties = null, $after = null, $before = null, $limit = null, $sort = null, $ids = null, $id_lte = null, $id_gte = null, $created_at = null, $created_at_lte = null, $created_at_gte = null, $updated_at = null, $updated_at_lte = null, $updated_at_gte = null, $name = null, $path = null, $parent_folder_ids = null, $size = null, $size_lte = null, $size_gte = null, $height = null, $height_lte = null, $height_gte = null, $width = null, $width_lte = null, $width_gte = null, $encoding = null, $type = null, $extension = null, $url = null, $is_usable_in_content = null, $allows_anonymous_access = null, $file_md5 = null, $expires_at = null, $expires_at_lte = null, $expires_at_gte = null, string $contentType = self::contentTypes['doSearch'][0]) { $returnType = '\HubSpot\Client\Files\Model\CollectionResponseFile'; - $request = $this->doSearchRequest($after, $allows_anonymous_access, $before, $created_at, $created_at_gte, $created_at_lte, $encoding, $expires_at, $expires_at_gte, $expires_at_lte, $extension, $file_md5, $height, $height_gte, $height_lte, $id_gte, $id_lte, $ids, $is_usable_in_content, $limit, $name, $parent_folder_ids, $path, $properties, $size, $size_gte, $size_lte, $sort, $type, $updated_at, $updated_at_gte, $updated_at_lte, $url, $width, $width_gte, $width_lte, $contentType); + $request = $this->doSearchRequest($properties, $after, $before, $limit, $sort, $ids, $id_lte, $id_gte, $created_at, $created_at_lte, $created_at_gte, $updated_at, $updated_at_lte, $updated_at_gte, $name, $path, $parent_folder_ids, $size, $size_lte, $size_gte, $height, $height_lte, $height_gte, $width, $width_lte, $width_gte, $encoding, $type, $extension, $url, $is_usable_in_content, $allows_anonymous_access, $file_md5, $expires_at, $expires_at_lte, $expires_at_gte, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1527,48 +1527,48 @@ function ($exception) { /** * Create request for operation 'doSearch' * + * @param string[]|null $properties Desired file properties in the return object. (optional) * @param string|null $after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit. (optional) - * @param bool|null $allows_anonymous_access Search files by access. If 'true' will show only public files; if 'false' will show only private files (optional) * @param string|null $before Search files updated before this timestamp. Time must be epoch time in milliseconds. (optional) + * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) + * @param string[]|null $sort Sort files by a given field. (optional) + * @param int[]|null $ids (optional) + * @param int|null $id_lte Search files by less than or equal to ID. Can be used with idGte to create a range. (optional) + * @param int|null $id_gte Search files by greater than or equal to ID. Can be used with idLte to create a range. (optional) * @param \DateTime|null $created_at Search files by exact time of creation. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at_gte Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) * @param \DateTime|null $created_at_lte Search files by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) - * @param string|null $encoding Search files by specified encoding. (optional) - * @param \DateTime|null $expires_at Search files by exact expires time. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $expires_at_gte Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range. (optional) - * @param \DateTime|null $expires_at_lte Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range. (optional) - * @param string|null $extension Search files by given extension. (optional) - * @param string|null $file_md5 Search files by specific md5 hash. (optional) - * @param int|null $height Search files by height of image or video. (optional) - * @param int|null $height_gte Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range. (optional) - * @param int|null $height_lte Search files by less than or equal to height of image or video. Can be used with heightGte to create a range. (optional) - * @param int|null $id_gte Search files by greater than or equal to ID. Can be used with idLte to create a range. (optional) - * @param int|null $id_lte Search files by less than or equal to ID. Can be used with idGte to create a range. (optional) - * @param int[]|null $ids (optional) - * @param bool|null $is_usable_in_content If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content. (optional) - * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) + * @param \DateTime|null $created_at_gte Search files by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) + * @param \DateTime|null $updated_at Search files by exact time of latest updated. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $updated_at_lte Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) + * @param \DateTime|null $updated_at_gte Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) * @param string|null $name Search for files containing the given name. (optional) - * @param int[]|null $parent_folder_ids (optional) * @param string|null $path Search files by path. (optional) - * @param string[]|null $properties Desired file properties in the return object. (optional) + * @param int[]|null $parent_folder_ids (optional) * @param int|null $size Search files by exact file size in bytes. (optional) - * @param int|null $size_gte Search files by greater than or equal to file size. Can be used with sizeLte to create a range. (optional) * @param int|null $size_lte Search files by less than or equal to file size. Can be used with sizeGte to create a range. (optional) - * @param string[]|null $sort Sort files by a given field. (optional) - * @param string|null $type Search files by file type. (optional) - * @param \DateTime|null $updated_at Search files by exact time of latest updated. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $updated_at_gte Search files by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) - * @param \DateTime|null $updated_at_lte Search files by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) - * @param string|null $url Search for given URL (optional) + * @param int|null $size_gte Search files by greater than or equal to file size. Can be used with sizeLte to create a range. (optional) + * @param int|null $height Search files by height of image or video. (optional) + * @param int|null $height_lte Search files by less than or equal to height of image or video. Can be used with heightGte to create a range. (optional) + * @param int|null $height_gte Search files by greater than or equal to height of image or video. Can be used with heightLte to create a range. (optional) * @param int|null $width Search files by width of image or video. (optional) - * @param int|null $width_gte Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range. (optional) * @param int|null $width_lte Search files by less than or equal to width of image or video. Can be used with widthGte to create a range. (optional) + * @param int|null $width_gte Search files by greater than or equal to width of image or video. Can be used with widthLte to create a range. (optional) + * @param string|null $encoding Search files by specified encoding. (optional) + * @param string|null $type Search files by file type. (optional) + * @param string|null $extension Search files by given extension. (optional) + * @param string|null $url Search for given URL (optional) + * @param bool|null $is_usable_in_content If true shows files that have been marked to be used in new content. It false shows files that should not be used in new content. (optional) + * @param bool|null $allows_anonymous_access Search files by access. If 'true' will show only public files; if 'false' will show only private files (optional) + * @param string|null $file_md5 Search files by specific md5 hash. (optional) + * @param \DateTime|null $expires_at Search files by exact expires time. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $expires_at_lte Search files by less than or equal to expires time. Can be used with expiresAtGte to create a range. (optional) + * @param \DateTime|null $expires_at_gte Search files by greater than or equal to expires time. Can be used with expiresAtLte to create a range. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function doSearchRequest($after = null, $allows_anonymous_access = null, $before = null, $created_at = null, $created_at_gte = null, $created_at_lte = null, $encoding = null, $expires_at = null, $expires_at_gte = null, $expires_at_lte = null, $extension = null, $file_md5 = null, $height = null, $height_gte = null, $height_lte = null, $id_gte = null, $id_lte = null, $ids = null, $is_usable_in_content = null, $limit = null, $name = null, $parent_folder_ids = null, $path = null, $properties = null, $size = null, $size_gte = null, $size_lte = null, $sort = null, $type = null, $updated_at = null, $updated_at_gte = null, $updated_at_lte = null, $url = null, $width = null, $width_gte = null, $width_lte = null, string $contentType = self::contentTypes['doSearch'][0]) + public function doSearchRequest($properties = null, $after = null, $before = null, $limit = null, $sort = null, $ids = null, $id_lte = null, $id_gte = null, $created_at = null, $created_at_lte = null, $created_at_gte = null, $updated_at = null, $updated_at_lte = null, $updated_at_gte = null, $name = null, $path = null, $parent_folder_ids = null, $size = null, $size_lte = null, $size_gte = null, $height = null, $height_lte = null, $height_gte = null, $width = null, $width_lte = null, $width_gte = null, $encoding = null, $type = null, $extension = null, $url = null, $is_usable_in_content = null, $allows_anonymous_access = null, $file_md5 = null, $expires_at = null, $expires_at_lte = null, $expires_at_gte = null, string $contentType = self::contentTypes['doSearch'][0]) { @@ -1617,18 +1617,18 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $allows_anonymous_access, - 'allowsAnonymousAccess', // param base name - 'boolean', // openApiType + $after, + 'after', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -1644,53 +1644,53 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at_gte, - 'createdAtGte', // param base name - 'string', // openApiType + $sort, + 'sort', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at_lte, - 'createdAtLte', // param base name - 'string', // openApiType + $ids, + 'ids', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $encoding, - 'encoding', // param base name - 'string', // openApiType + $id_lte, + 'idLte', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $expires_at, - 'expiresAt', // param base name - 'string', // openApiType + $id_gte, + 'idGte', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $expires_at_gte, - 'expiresAtGte', // param base name + $created_at, + 'createdAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1698,8 +1698,8 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $expires_at_lte, - 'expiresAtLte', // param base name + $created_at_lte, + 'createdAtLte', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1707,8 +1707,8 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $extension, - 'extension', // param base name + $created_at_gte, + 'createdAtGte', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1716,8 +1716,8 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $file_md5, - 'fileMd5', // param base name + $updated_at, + 'updatedAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1725,71 +1725,71 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $height, - 'height', // param base name - 'integer', // openApiType + $updated_at_lte, + 'updatedAtLte', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $height_gte, - 'heightGte', // param base name - 'integer', // openApiType + $updated_at_gte, + 'updatedAtGte', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $height_lte, - 'heightLte', // param base name - 'integer', // openApiType + $name, + 'name', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_gte, - 'idGte', // param base name - 'integer', // openApiType + $path, + 'path', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_lte, - 'idLte', // param base name - 'integer', // openApiType + $parent_folder_ids, + 'parentFolderIds', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ids, - 'ids', // param base name - 'array', // openApiType + $size, + 'size', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $is_usable_in_content, - 'isUsableInContent', // param base name - 'boolean', // openApiType + $size_lte, + 'sizeLte', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name + $size_gte, + 'sizeGte', // param base name 'integer', // openApiType 'form', // style true, // explode @@ -1797,44 +1797,44 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $name, - 'name', // param base name - 'string', // openApiType + $height, + 'height', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $parent_folder_ids, - 'parentFolderIds', // param base name - 'array', // openApiType + $height_lte, + 'heightLte', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $path, - 'path', // param base name - 'string', // openApiType + $height_gte, + 'heightGte', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $width, + 'width', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $size, - 'size', // param base name + $width_lte, + 'widthLte', // param base name 'integer', // openApiType 'form', // style true, // explode @@ -1842,8 +1842,8 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $size_gte, - 'sizeGte', // param base name + $width_gte, + 'widthGte', // param base name 'integer', // openApiType 'form', // style true, // explode @@ -1851,26 +1851,26 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $size_lte, - 'sizeLte', // param base name - 'integer', // openApiType + $encoding, + 'encoding', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType + $type, + 'type', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $type, - 'type', // param base name + $extension, + 'extension', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1878,8 +1878,8 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name + $url, + 'url', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1887,26 +1887,26 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at_gte, - 'updatedAtGte', // param base name - 'string', // openApiType + $is_usable_in_content, + 'isUsableInContent', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at_lte, - 'updatedAtLte', // param base name - 'string', // openApiType + $allows_anonymous_access, + 'allowsAnonymousAccess', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $url, - 'url', // param base name + $file_md5, + 'fileMd5', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1914,27 +1914,27 @@ public function doSearchRequest($after = null, $allows_anonymous_access = null, ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $width, - 'width', // param base name - 'integer', // openApiType + $expires_at, + 'expiresAt', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $width_gte, - 'widthGte', // param base name - 'integer', // openApiType + $expires_at_lte, + 'expiresAtLte', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $width_lte, - 'widthLte', // param base name - 'integer', // openApiType + $expires_at_gte, + 'expiresAtGte', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -2614,8 +2614,8 @@ public function getMetadataRequest($path, $properties = null, string $contentTyp * Get signed URL to access private file * * @param string $file_id ID of file. (required) - * @param int|null $expiration_seconds How long in seconds the link will provide access to the file. (optional) * @param string|null $size For image files. This will resize the image to the desired size before sharing. Does not affect the original file, just the file served by this signed URL. (optional) + * @param int|null $expiration_seconds How long in seconds the link will provide access to the file. (optional) * @param bool|null $upscale If size is provided, this will upscale the image to fit the size dimensions. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSignedUrl'] to see the possible values for this operation * @@ -2623,9 +2623,9 @@ public function getMetadataRequest($path, $properties = null, string $contentTyp * @throws \InvalidArgumentException * @return \HubSpot\Client\Files\Model\SignedUrl|\HubSpot\Client\Files\Model\Error */ - public function getSignedUrl($file_id, $expiration_seconds = null, $size = null, $upscale = null, string $contentType = self::contentTypes['getSignedUrl'][0]) + public function getSignedUrl($file_id, $size = null, $expiration_seconds = null, $upscale = null, string $contentType = self::contentTypes['getSignedUrl'][0]) { - list($response) = $this->getSignedUrlWithHttpInfo($file_id, $expiration_seconds, $size, $upscale, $contentType); + list($response) = $this->getSignedUrlWithHttpInfo($file_id, $size, $expiration_seconds, $upscale, $contentType); return $response; } @@ -2635,8 +2635,8 @@ public function getSignedUrl($file_id, $expiration_seconds = null, $size = null, * Get signed URL to access private file * * @param string $file_id ID of file. (required) - * @param int|null $expiration_seconds How long in seconds the link will provide access to the file. (optional) * @param string|null $size For image files. This will resize the image to the desired size before sharing. Does not affect the original file, just the file served by this signed URL. (optional) + * @param int|null $expiration_seconds How long in seconds the link will provide access to the file. (optional) * @param bool|null $upscale If size is provided, this will upscale the image to fit the size dimensions. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSignedUrl'] to see the possible values for this operation * @@ -2644,9 +2644,9 @@ public function getSignedUrl($file_id, $expiration_seconds = null, $size = null, * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Files\Model\SignedUrl|\HubSpot\Client\Files\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getSignedUrlWithHttpInfo($file_id, $expiration_seconds = null, $size = null, $upscale = null, string $contentType = self::contentTypes['getSignedUrl'][0]) + public function getSignedUrlWithHttpInfo($file_id, $size = null, $expiration_seconds = null, $upscale = null, string $contentType = self::contentTypes['getSignedUrl'][0]) { - $request = $this->getSignedUrlRequest($file_id, $expiration_seconds, $size, $upscale, $contentType); + $request = $this->getSignedUrlRequest($file_id, $size, $expiration_seconds, $upscale, $contentType); try { $options = $this->createHttpClientOption(); @@ -2737,17 +2737,17 @@ public function getSignedUrlWithHttpInfo($file_id, $expiration_seconds = null, $ * Get signed URL to access private file * * @param string $file_id ID of file. (required) - * @param int|null $expiration_seconds How long in seconds the link will provide access to the file. (optional) * @param string|null $size For image files. This will resize the image to the desired size before sharing. Does not affect the original file, just the file served by this signed URL. (optional) + * @param int|null $expiration_seconds How long in seconds the link will provide access to the file. (optional) * @param bool|null $upscale If size is provided, this will upscale the image to fit the size dimensions. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSignedUrl'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSignedUrlAsync($file_id, $expiration_seconds = null, $size = null, $upscale = null, string $contentType = self::contentTypes['getSignedUrl'][0]) + public function getSignedUrlAsync($file_id, $size = null, $expiration_seconds = null, $upscale = null, string $contentType = self::contentTypes['getSignedUrl'][0]) { - return $this->getSignedUrlAsyncWithHttpInfo($file_id, $expiration_seconds, $size, $upscale, $contentType) + return $this->getSignedUrlAsyncWithHttpInfo($file_id, $size, $expiration_seconds, $upscale, $contentType) ->then( function ($response) { return $response[0]; @@ -2761,18 +2761,18 @@ function ($response) { * Get signed URL to access private file * * @param string $file_id ID of file. (required) - * @param int|null $expiration_seconds How long in seconds the link will provide access to the file. (optional) * @param string|null $size For image files. This will resize the image to the desired size before sharing. Does not affect the original file, just the file served by this signed URL. (optional) + * @param int|null $expiration_seconds How long in seconds the link will provide access to the file. (optional) * @param bool|null $upscale If size is provided, this will upscale the image to fit the size dimensions. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSignedUrl'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getSignedUrlAsyncWithHttpInfo($file_id, $expiration_seconds = null, $size = null, $upscale = null, string $contentType = self::contentTypes['getSignedUrl'][0]) + public function getSignedUrlAsyncWithHttpInfo($file_id, $size = null, $expiration_seconds = null, $upscale = null, string $contentType = self::contentTypes['getSignedUrl'][0]) { $returnType = '\HubSpot\Client\Files\Model\SignedUrl'; - $request = $this->getSignedUrlRequest($file_id, $expiration_seconds, $size, $upscale, $contentType); + $request = $this->getSignedUrlRequest($file_id, $size, $expiration_seconds, $upscale, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2814,15 +2814,15 @@ function ($exception) { * Create request for operation 'getSignedUrl' * * @param string $file_id ID of file. (required) - * @param int|null $expiration_seconds How long in seconds the link will provide access to the file. (optional) * @param string|null $size For image files. This will resize the image to the desired size before sharing. Does not affect the original file, just the file served by this signed URL. (optional) + * @param int|null $expiration_seconds How long in seconds the link will provide access to the file. (optional) * @param bool|null $upscale If size is provided, this will upscale the image to fit the size dimensions. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getSignedUrl'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getSignedUrlRequest($file_id, $expiration_seconds = null, $size = null, $upscale = null, string $contentType = self::contentTypes['getSignedUrl'][0]) + public function getSignedUrlRequest($file_id, $size = null, $expiration_seconds = null, $upscale = null, string $contentType = self::contentTypes['getSignedUrl'][0]) { // verify the required parameter 'file_id' is set @@ -2848,18 +2848,18 @@ public function getSignedUrlRequest($file_id, $expiration_seconds = null, $size // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $expiration_seconds, - 'expirationSeconds', // param base name - 'integer', // openApiType + $size, + 'size', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $size, - 'size', // param base name - 'string', // openApiType + $expiration_seconds, + 'expirationSeconds', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required @@ -3480,7 +3480,7 @@ public function replaceRequest($file_id, $charset_hunch = null, $file = null, $o $formDataProcessor = new FormDataProcessor(); $formData = $formDataProcessor->prepare([ - 'charset_hunch' => $charset_hunch, + 'charsetHunch' => $charset_hunch, 'file' => $file, 'options' => $options, ]); @@ -4102,11 +4102,11 @@ public function uploadRequest($charset_hunch = null, $file = null, $file_name = $formDataProcessor = new FormDataProcessor(); $formData = $formDataProcessor->prepare([ - 'charset_hunch' => $charset_hunch, + 'charsetHunch' => $charset_hunch, 'file' => $file, - 'file_name' => $file_name, - 'folder_id' => $folder_id, - 'folder_path' => $folder_path, + 'fileName' => $file_name, + 'folderId' => $folder_id, + 'folderPath' => $folder_path, 'options' => $options, ]); diff --git a/codegen/Files/Api/FoldersApi.php b/codegen/Files/Api/FoldersApi.php index b28c8ab8..23383963 100644 --- a/codegen/Files/Api/FoldersApi.php +++ b/codegen/Files/Api/FoldersApi.php @@ -902,32 +902,32 @@ public function checkUpdateStatusRequest($task_id, string $contentType = self::c * * Search folders * + * @param string[]|null $properties Properties that should be included in the returned folders. (optional) * @param string|null $after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit. (optional) * @param string|null $before Search folders updated before this timestamp. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at Search folders by exact time of creation. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at_gte Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) - * @param \DateTime|null $created_at_lte Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) - * @param int|null $id_gte Search folders by greater than or equal to ID. Can be used with idLte to create a range. (optional) - * @param int|null $id_lte Search folders by less than or equal to ID. Can be used with idGte to create a range. (optional) - * @param int[]|null $ids Search folders by multiple IDs. Comma-separated list of folder IDs. (optional) * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) - * @param string|null $name Search for folders containing the specified name. (optional) - * @param int[]|null $parent_folder_ids (optional) - * @param string|null $path Search folders by path. (optional) - * @param string[]|null $properties Properties that should be included in the returned folders. (optional) * @param string[]|null $sort Sort results by given property. For example -name sorts by name field descending, name sorts by name field ascending. (optional) + * @param int[]|null $ids Search folders by multiple IDs. Comma-separated list of folder IDs. (optional) + * @param int|null $id_lte Search folders by less than or equal to ID. Can be used with idGte to create a range. (optional) + * @param int|null $id_gte Search folders by greater than or equal to ID. Can be used with idLte to create a range. (optional) + * @param \DateTime|null $created_at Search folders by exact time of creation. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $created_at_lte Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) + * @param \DateTime|null $created_at_gte Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) * @param \DateTime|null $updated_at Search folders by exact time of latest updated. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $updated_at_gte Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) * @param \DateTime|null $updated_at_lte Search folders by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) + * @param \DateTime|null $updated_at_gte Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) + * @param string|null $name Search for folders containing the specified name. (optional) + * @param string|null $path Search folders by path. (optional) + * @param int[]|null $parent_folder_ids (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \HubSpot\Client\Files\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Files\Model\CollectionResponseFolder|\HubSpot\Client\Files\Model\Error */ - public function doSearch($after = null, $before = null, $created_at = null, $created_at_gte = null, $created_at_lte = null, $id_gte = null, $id_lte = null, $ids = null, $limit = null, $name = null, $parent_folder_ids = null, $path = null, $properties = null, $sort = null, $updated_at = null, $updated_at_gte = null, $updated_at_lte = null, string $contentType = self::contentTypes['doSearch'][0]) + public function doSearch($properties = null, $after = null, $before = null, $limit = null, $sort = null, $ids = null, $id_lte = null, $id_gte = null, $created_at = null, $created_at_lte = null, $created_at_gte = null, $updated_at = null, $updated_at_lte = null, $updated_at_gte = null, $name = null, $path = null, $parent_folder_ids = null, string $contentType = self::contentTypes['doSearch'][0]) { - list($response) = $this->doSearchWithHttpInfo($after, $before, $created_at, $created_at_gte, $created_at_lte, $id_gte, $id_lte, $ids, $limit, $name, $parent_folder_ids, $path, $properties, $sort, $updated_at, $updated_at_gte, $updated_at_lte, $contentType); + list($response) = $this->doSearchWithHttpInfo($properties, $after, $before, $limit, $sort, $ids, $id_lte, $id_gte, $created_at, $created_at_lte, $created_at_gte, $updated_at, $updated_at_lte, $updated_at_gte, $name, $path, $parent_folder_ids, $contentType); return $response; } @@ -936,32 +936,32 @@ public function doSearch($after = null, $before = null, $created_at = null, $cre * * Search folders * + * @param string[]|null $properties Properties that should be included in the returned folders. (optional) * @param string|null $after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit. (optional) * @param string|null $before Search folders updated before this timestamp. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at Search folders by exact time of creation. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at_gte Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) - * @param \DateTime|null $created_at_lte Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) - * @param int|null $id_gte Search folders by greater than or equal to ID. Can be used with idLte to create a range. (optional) - * @param int|null $id_lte Search folders by less than or equal to ID. Can be used with idGte to create a range. (optional) - * @param int[]|null $ids Search folders by multiple IDs. Comma-separated list of folder IDs. (optional) * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) - * @param string|null $name Search for folders containing the specified name. (optional) - * @param int[]|null $parent_folder_ids (optional) - * @param string|null $path Search folders by path. (optional) - * @param string[]|null $properties Properties that should be included in the returned folders. (optional) * @param string[]|null $sort Sort results by given property. For example -name sorts by name field descending, name sorts by name field ascending. (optional) + * @param int[]|null $ids Search folders by multiple IDs. Comma-separated list of folder IDs. (optional) + * @param int|null $id_lte Search folders by less than or equal to ID. Can be used with idGte to create a range. (optional) + * @param int|null $id_gte Search folders by greater than or equal to ID. Can be used with idLte to create a range. (optional) + * @param \DateTime|null $created_at Search folders by exact time of creation. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $created_at_lte Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) + * @param \DateTime|null $created_at_gte Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) * @param \DateTime|null $updated_at Search folders by exact time of latest updated. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $updated_at_gte Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) * @param \DateTime|null $updated_at_lte Search folders by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) + * @param \DateTime|null $updated_at_gte Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) + * @param string|null $name Search for folders containing the specified name. (optional) + * @param string|null $path Search folders by path. (optional) + * @param int[]|null $parent_folder_ids (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \HubSpot\Client\Files\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Files\Model\CollectionResponseFolder|\HubSpot\Client\Files\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function doSearchWithHttpInfo($after = null, $before = null, $created_at = null, $created_at_gte = null, $created_at_lte = null, $id_gte = null, $id_lte = null, $ids = null, $limit = null, $name = null, $parent_folder_ids = null, $path = null, $properties = null, $sort = null, $updated_at = null, $updated_at_gte = null, $updated_at_lte = null, string $contentType = self::contentTypes['doSearch'][0]) + public function doSearchWithHttpInfo($properties = null, $after = null, $before = null, $limit = null, $sort = null, $ids = null, $id_lte = null, $id_gte = null, $created_at = null, $created_at_lte = null, $created_at_gte = null, $updated_at = null, $updated_at_lte = null, $updated_at_gte = null, $name = null, $path = null, $parent_folder_ids = null, string $contentType = self::contentTypes['doSearch'][0]) { - $request = $this->doSearchRequest($after, $before, $created_at, $created_at_gte, $created_at_lte, $id_gte, $id_lte, $ids, $limit, $name, $parent_folder_ids, $path, $properties, $sort, $updated_at, $updated_at_gte, $updated_at_lte, $contentType); + $request = $this->doSearchRequest($properties, $after, $before, $limit, $sort, $ids, $id_lte, $id_gte, $created_at, $created_at_lte, $created_at_gte, $updated_at, $updated_at_lte, $updated_at_gte, $name, $path, $parent_folder_ids, $contentType); try { $options = $this->createHttpClientOption(); @@ -1051,31 +1051,31 @@ public function doSearchWithHttpInfo($after = null, $before = null, $created_at * * Search folders * + * @param string[]|null $properties Properties that should be included in the returned folders. (optional) * @param string|null $after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit. (optional) * @param string|null $before Search folders updated before this timestamp. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at Search folders by exact time of creation. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at_gte Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) - * @param \DateTime|null $created_at_lte Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) - * @param int|null $id_gte Search folders by greater than or equal to ID. Can be used with idLte to create a range. (optional) - * @param int|null $id_lte Search folders by less than or equal to ID. Can be used with idGte to create a range. (optional) - * @param int[]|null $ids Search folders by multiple IDs. Comma-separated list of folder IDs. (optional) * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) - * @param string|null $name Search for folders containing the specified name. (optional) - * @param int[]|null $parent_folder_ids (optional) - * @param string|null $path Search folders by path. (optional) - * @param string[]|null $properties Properties that should be included in the returned folders. (optional) * @param string[]|null $sort Sort results by given property. For example -name sorts by name field descending, name sorts by name field ascending. (optional) + * @param int[]|null $ids Search folders by multiple IDs. Comma-separated list of folder IDs. (optional) + * @param int|null $id_lte Search folders by less than or equal to ID. Can be used with idGte to create a range. (optional) + * @param int|null $id_gte Search folders by greater than or equal to ID. Can be used with idLte to create a range. (optional) + * @param \DateTime|null $created_at Search folders by exact time of creation. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $created_at_lte Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) + * @param \DateTime|null $created_at_gte Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) * @param \DateTime|null $updated_at Search folders by exact time of latest updated. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $updated_at_gte Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) * @param \DateTime|null $updated_at_lte Search folders by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) + * @param \DateTime|null $updated_at_gte Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) + * @param string|null $name Search for folders containing the specified name. (optional) + * @param string|null $path Search folders by path. (optional) + * @param int[]|null $parent_folder_ids (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function doSearchAsync($after = null, $before = null, $created_at = null, $created_at_gte = null, $created_at_lte = null, $id_gte = null, $id_lte = null, $ids = null, $limit = null, $name = null, $parent_folder_ids = null, $path = null, $properties = null, $sort = null, $updated_at = null, $updated_at_gte = null, $updated_at_lte = null, string $contentType = self::contentTypes['doSearch'][0]) + public function doSearchAsync($properties = null, $after = null, $before = null, $limit = null, $sort = null, $ids = null, $id_lte = null, $id_gte = null, $created_at = null, $created_at_lte = null, $created_at_gte = null, $updated_at = null, $updated_at_lte = null, $updated_at_gte = null, $name = null, $path = null, $parent_folder_ids = null, string $contentType = self::contentTypes['doSearch'][0]) { - return $this->doSearchAsyncWithHttpInfo($after, $before, $created_at, $created_at_gte, $created_at_lte, $id_gte, $id_lte, $ids, $limit, $name, $parent_folder_ids, $path, $properties, $sort, $updated_at, $updated_at_gte, $updated_at_lte, $contentType) + return $this->doSearchAsyncWithHttpInfo($properties, $after, $before, $limit, $sort, $ids, $id_lte, $id_gte, $created_at, $created_at_lte, $created_at_gte, $updated_at, $updated_at_lte, $updated_at_gte, $name, $path, $parent_folder_ids, $contentType) ->then( function ($response) { return $response[0]; @@ -1088,32 +1088,32 @@ function ($response) { * * Search folders * + * @param string[]|null $properties Properties that should be included in the returned folders. (optional) * @param string|null $after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit. (optional) * @param string|null $before Search folders updated before this timestamp. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at Search folders by exact time of creation. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at_gte Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) - * @param \DateTime|null $created_at_lte Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) - * @param int|null $id_gte Search folders by greater than or equal to ID. Can be used with idLte to create a range. (optional) - * @param int|null $id_lte Search folders by less than or equal to ID. Can be used with idGte to create a range. (optional) - * @param int[]|null $ids Search folders by multiple IDs. Comma-separated list of folder IDs. (optional) * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) - * @param string|null $name Search for folders containing the specified name. (optional) - * @param int[]|null $parent_folder_ids (optional) - * @param string|null $path Search folders by path. (optional) - * @param string[]|null $properties Properties that should be included in the returned folders. (optional) * @param string[]|null $sort Sort results by given property. For example -name sorts by name field descending, name sorts by name field ascending. (optional) + * @param int[]|null $ids Search folders by multiple IDs. Comma-separated list of folder IDs. (optional) + * @param int|null $id_lte Search folders by less than or equal to ID. Can be used with idGte to create a range. (optional) + * @param int|null $id_gte Search folders by greater than or equal to ID. Can be used with idLte to create a range. (optional) + * @param \DateTime|null $created_at Search folders by exact time of creation. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $created_at_lte Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) + * @param \DateTime|null $created_at_gte Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) * @param \DateTime|null $updated_at Search folders by exact time of latest updated. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $updated_at_gte Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) * @param \DateTime|null $updated_at_lte Search folders by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) + * @param \DateTime|null $updated_at_gte Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) + * @param string|null $name Search for folders containing the specified name. (optional) + * @param string|null $path Search folders by path. (optional) + * @param int[]|null $parent_folder_ids (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function doSearchAsyncWithHttpInfo($after = null, $before = null, $created_at = null, $created_at_gte = null, $created_at_lte = null, $id_gte = null, $id_lte = null, $ids = null, $limit = null, $name = null, $parent_folder_ids = null, $path = null, $properties = null, $sort = null, $updated_at = null, $updated_at_gte = null, $updated_at_lte = null, string $contentType = self::contentTypes['doSearch'][0]) + public function doSearchAsyncWithHttpInfo($properties = null, $after = null, $before = null, $limit = null, $sort = null, $ids = null, $id_lte = null, $id_gte = null, $created_at = null, $created_at_lte = null, $created_at_gte = null, $updated_at = null, $updated_at_lte = null, $updated_at_gte = null, $name = null, $path = null, $parent_folder_ids = null, string $contentType = self::contentTypes['doSearch'][0]) { $returnType = '\HubSpot\Client\Files\Model\CollectionResponseFolder'; - $request = $this->doSearchRequest($after, $before, $created_at, $created_at_gte, $created_at_lte, $id_gte, $id_lte, $ids, $limit, $name, $parent_folder_ids, $path, $properties, $sort, $updated_at, $updated_at_gte, $updated_at_lte, $contentType); + $request = $this->doSearchRequest($properties, $after, $before, $limit, $sort, $ids, $id_lte, $id_gte, $created_at, $created_at_lte, $created_at_gte, $updated_at, $updated_at_lte, $updated_at_gte, $name, $path, $parent_folder_ids, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1154,29 +1154,29 @@ function ($exception) { /** * Create request for operation 'doSearch' * + * @param string[]|null $properties Properties that should be included in the returned folders. (optional) * @param string|null $after Offset search results by this value. The default offset is 0 and the maximum offset of items for a given search is 10,000. Narrow your search down if you are reaching this limit. (optional) * @param string|null $before Search folders updated before this timestamp. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at Search folders by exact time of creation. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $created_at_gte Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) - * @param \DateTime|null $created_at_lte Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) - * @param int|null $id_gte Search folders by greater than or equal to ID. Can be used with idLte to create a range. (optional) - * @param int|null $id_lte Search folders by less than or equal to ID. Can be used with idGte to create a range. (optional) - * @param int[]|null $ids Search folders by multiple IDs. Comma-separated list of folder IDs. (optional) * @param int|null $limit Number of items to return. Default limit is 10, maximum limit is 100. (optional) - * @param string|null $name Search for folders containing the specified name. (optional) - * @param int[]|null $parent_folder_ids (optional) - * @param string|null $path Search folders by path. (optional) - * @param string[]|null $properties Properties that should be included in the returned folders. (optional) * @param string[]|null $sort Sort results by given property. For example -name sorts by name field descending, name sorts by name field ascending. (optional) + * @param int[]|null $ids Search folders by multiple IDs. Comma-separated list of folder IDs. (optional) + * @param int|null $id_lte Search folders by less than or equal to ID. Can be used with idGte to create a range. (optional) + * @param int|null $id_gte Search folders by greater than or equal to ID. Can be used with idLte to create a range. (optional) + * @param \DateTime|null $created_at Search folders by exact time of creation. Time must be epoch time in milliseconds. (optional) + * @param \DateTime|null $created_at_lte Search folders by less than or equal to time of creation. Can be used with createdAtGte to create a range. (optional) + * @param \DateTime|null $created_at_gte Search folders by greater than or equal to time of creation. Can be used with createdAtLte to create a range. (optional) * @param \DateTime|null $updated_at Search folders by exact time of latest updated. Time must be epoch time in milliseconds. (optional) - * @param \DateTime|null $updated_at_gte Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) * @param \DateTime|null $updated_at_lte Search folders by less than or equal to time of latest update. Can be used with updatedAtGte to create a range. (optional) + * @param \DateTime|null $updated_at_gte Search folders by greater than or equal to time of latest update. Can be used with updatedAtLte to create a range. (optional) + * @param string|null $name Search for folders containing the specified name. (optional) + * @param string|null $path Search folders by path. (optional) + * @param int[]|null $parent_folder_ids (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['doSearch'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function doSearchRequest($after = null, $before = null, $created_at = null, $created_at_gte = null, $created_at_lte = null, $id_gte = null, $id_lte = null, $ids = null, $limit = null, $name = null, $parent_folder_ids = null, $path = null, $properties = null, $sort = null, $updated_at = null, $updated_at_gte = null, $updated_at_lte = null, string $contentType = self::contentTypes['doSearch'][0]) + public function doSearchRequest($properties = null, $after = null, $before = null, $limit = null, $sort = null, $ids = null, $id_lte = null, $id_gte = null, $created_at = null, $created_at_lte = null, $created_at_gte = null, $updated_at = null, $updated_at_lte = null, $updated_at_gte = null, $name = null, $path = null, $parent_folder_ids = null, string $contentType = self::contentTypes['doSearch'][0]) { @@ -1206,17 +1206,17 @@ public function doSearchRequest($after = null, $before = null, $created_at = nul // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType + $properties, + 'properties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $before, - 'before', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1224,8 +1224,8 @@ public function doSearchRequest($after = null, $before = null, $created_at = nul ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name + $before, + 'before', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1233,27 +1233,27 @@ public function doSearchRequest($after = null, $before = null, $created_at = nul ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at_gte, - 'createdAtGte', // param base name - 'string', // openApiType + $limit, + 'limit', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at_lte, - 'createdAtLte', // param base name - 'string', // openApiType + $sort, + 'sort', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $id_gte, - 'idGte', // param base name - 'integer', // openApiType + $ids, + 'ids', // param base name + 'array', // openApiType 'form', // style true, // explode false // required @@ -1269,26 +1269,26 @@ public function doSearchRequest($after = null, $before = null, $created_at = nul ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $ids, - 'ids', // param base name - 'array', // openApiType + $id_gte, + 'idGte', // param base name + 'integer', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType + $created_at, + 'createdAt', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $name, - 'name', // param base name + $created_at_lte, + 'createdAtLte', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1296,17 +1296,17 @@ public function doSearchRequest($after = null, $before = null, $created_at = nul ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $parent_folder_ids, - 'parentFolderIds', // param base name - 'array', // openApiType + $created_at_gte, + 'createdAtGte', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $path, - 'path', // param base name + $updated_at, + 'updatedAt', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1314,26 +1314,26 @@ public function doSearchRequest($after = null, $before = null, $created_at = nul ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name - 'array', // openApiType + $updated_at_lte, + 'updatedAtLte', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name - 'array', // openApiType + $updated_at_gte, + 'updatedAtGte', // param base name + 'string', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name + $name, + 'name', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1341,8 +1341,8 @@ public function doSearchRequest($after = null, $before = null, $created_at = nul ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at_gte, - 'updatedAtGte', // param base name + $path, + 'path', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1350,9 +1350,9 @@ public function doSearchRequest($after = null, $before = null, $created_at = nul ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at_lte, - 'updatedAtLte', // param base name - 'string', // openApiType + $parent_folder_ids, + 'parentFolderIds', // param base name + 'array', // openApiType 'form', // style true, // explode false // required diff --git a/codegen/Marketing/Emails/Api/BasicApi.php b/codegen/Marketing/Emails/Api/BasicApi.php index 97489560..239194da 100644 --- a/codegen/Marketing/Emails/Api/BasicApi.php +++ b/codegen/Marketing/Emails/Api/BasicApi.php @@ -73,16 +73,16 @@ class BasicApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'getEmailsList' => [ + 'create' => [ 'application/json', ], - 'getHistogram' => [ + 'getEmailsList' => [ 'application/json', ], - 'marketingV3Emails' => [ + 'getHistogram' => [ 'application/json', ], - 'marketingV3Emails_0' => [ + 'getPage' => [ 'application/json', ], ]; @@ -134,44 +134,34 @@ public function getConfig() } /** - * Operation getEmailsList - * - * Get aggregated statistics + * Operation create * - * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) - * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) - * @param string|null $property Specifies which email properties should be returned. All properties will be returned by default. (optional) - * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailsList'] to see the possible values for this operation + * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request email_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics|\HubSpot\Client\Marketing\Emails\Model\Error + * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error */ - public function getEmailsList($email_ids = null, $end_timestamp = null, $property = null, $start_timestamp = null, string $contentType = self::contentTypes['getEmailsList'][0]) + public function create($email_create_request, string $contentType = self::contentTypes['create'][0]) { - list($response) = $this->getEmailsListWithHttpInfo($email_ids, $end_timestamp, $property, $start_timestamp, $contentType); + list($response) = $this->createWithHttpInfo($email_create_request, $contentType); return $response; } /** - * Operation getEmailsListWithHttpInfo + * Operation createWithHttpInfo * - * Get aggregated statistics - * - * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) - * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) - * @param string|null $property Specifies which email properties should be returned. All properties will be returned by default. (optional) - * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailsList'] to see the possible values for this operation + * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getEmailsListWithHttpInfo($email_ids = null, $end_timestamp = null, $property = null, $start_timestamp = null, string $contentType = self::contentTypes['getEmailsList'][0]) + public function createWithHttpInfo($email_create_request, string $contentType = self::contentTypes['create'][0]) { - $request = $this->getEmailsListRequest($email_ids, $end_timestamp, $property, $start_timestamp, $contentType); + $request = $this->createRequest($email_create_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -197,9 +187,9 @@ public function getEmailsListWithHttpInfo($email_ids = null, $end_timestamp = nu switch($statusCode) { - case 200: + case 201: return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics', + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', $request, $response, ); @@ -227,16 +217,16 @@ public function getEmailsListWithHttpInfo($email_ids = null, $end_timestamp = nu } return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics', + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics', + '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -257,22 +247,17 @@ public function getEmailsListWithHttpInfo($email_ids = null, $end_timestamp = nu } /** - * Operation getEmailsListAsync - * - * Get aggregated statistics + * Operation createAsync * - * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) - * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) - * @param string|null $property Specifies which email properties should be returned. All properties will be returned by default. (optional) - * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailsList'] to see the possible values for this operation + * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailsListAsync($email_ids = null, $end_timestamp = null, $property = null, $start_timestamp = null, string $contentType = self::contentTypes['getEmailsList'][0]) + public function createAsync($email_create_request, string $contentType = self::contentTypes['create'][0]) { - return $this->getEmailsListAsyncWithHttpInfo($email_ids, $end_timestamp, $property, $start_timestamp, $contentType) + return $this->createAsyncWithHttpInfo($email_create_request, $contentType) ->then( function ($response) { return $response[0]; @@ -281,23 +266,18 @@ function ($response) { } /** - * Operation getEmailsListAsyncWithHttpInfo - * - * Get aggregated statistics + * Operation createAsyncWithHttpInfo * - * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) - * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) - * @param string|null $property Specifies which email properties should be returned. All properties will be returned by default. (optional) - * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailsList'] to see the possible values for this operation + * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getEmailsListAsyncWithHttpInfo($email_ids = null, $end_timestamp = null, $property = null, $start_timestamp = null, string $contentType = self::contentTypes['getEmailsList'][0]) + public function createAsyncWithHttpInfo($email_create_request, string $contentType = self::contentTypes['create'][0]) { - $returnType = '\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics'; - $request = $this->getEmailsListRequest($email_ids, $end_timestamp, $property, $start_timestamp, $contentType); + $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; + $request = $this->createRequest($email_create_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -336,68 +316,32 @@ function ($exception) { } /** - * Create request for operation 'getEmailsList' + * Create request for operation 'create' * - * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) - * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) - * @param string|null $property Specifies which email properties should be returned. All properties will be returned by default. (optional) - * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailsList'] to see the possible values for this operation + * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getEmailsListRequest($email_ids = null, $end_timestamp = null, $property = null, $start_timestamp = null, string $contentType = self::contentTypes['getEmailsList'][0]) + public function createRequest($email_create_request, string $contentType = self::contentTypes['create'][0]) { + // verify the required parameter 'email_create_request' is set + if ($email_create_request === null || (is_array($email_create_request) && count($email_create_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $email_create_request when calling create' + ); + } - - - - $resourcePath = '/marketing/v3/emails/statistics/list'; + $resourcePath = '/marketing/v3/emails'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $email_ids, - 'emailIds', // param base name - 'array', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $end_timestamp, - 'endTimestamp', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $property, - 'property', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $start_timestamp, - 'startTimestamp', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); @@ -409,7 +353,14 @@ public function getEmailsListRequest($email_ids = null, $end_timestamp = null, $ ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($email_create_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($email_create_request), JSON_THROW_ON_ERROR); + } else { + $httpBody = $email_create_request; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -452,7 +403,7 @@ public function getEmailsListRequest($email_ids = null, $end_timestamp = null, $ $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -460,44 +411,44 @@ public function getEmailsListRequest($email_ids = null, $end_timestamp = null, $ } /** - * Operation getHistogram + * Operation getEmailsList * - * Get aggregated statistic intervals + * Get aggregated statistics * - * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) - * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) - * @param string|null $interval The interval to aggregate statistics for. (optional) * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHistogram'] to see the possible values for this operation + * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) + * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) + * @param string|null $property Specifies which email properties should be returned. All properties will be returned by default. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailsList'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval|\HubSpot\Client\Marketing\Emails\Model\Error + * @return \HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics|\HubSpot\Client\Marketing\Emails\Model\Error */ - public function getHistogram($email_ids = null, $end_timestamp = null, $interval = null, $start_timestamp = null, string $contentType = self::contentTypes['getHistogram'][0]) + public function getEmailsList($start_timestamp = null, $end_timestamp = null, $email_ids = null, $property = null, string $contentType = self::contentTypes['getEmailsList'][0]) { - list($response) = $this->getHistogramWithHttpInfo($email_ids, $end_timestamp, $interval, $start_timestamp, $contentType); + list($response) = $this->getEmailsListWithHttpInfo($start_timestamp, $end_timestamp, $email_ids, $property, $contentType); return $response; } /** - * Operation getHistogramWithHttpInfo + * Operation getEmailsListWithHttpInfo * - * Get aggregated statistic intervals + * Get aggregated statistics * - * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) - * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) - * @param string|null $interval The interval to aggregate statistics for. (optional) * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHistogram'] to see the possible values for this operation + * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) + * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) + * @param string|null $property Specifies which email properties should be returned. All properties will be returned by default. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailsList'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getHistogramWithHttpInfo($email_ids = null, $end_timestamp = null, $interval = null, $start_timestamp = null, string $contentType = self::contentTypes['getHistogram'][0]) + public function getEmailsListWithHttpInfo($start_timestamp = null, $end_timestamp = null, $email_ids = null, $property = null, string $contentType = self::contentTypes['getEmailsList'][0]) { - $request = $this->getHistogramRequest($email_ids, $end_timestamp, $interval, $start_timestamp, $contentType); + $request = $this->getEmailsListRequest($start_timestamp, $end_timestamp, $email_ids, $property, $contentType); try { $options = $this->createHttpClientOption(); @@ -525,7 +476,7 @@ public function getHistogramWithHttpInfo($email_ids = null, $end_timestamp = nul switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval', + '\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics', $request, $response, ); @@ -553,7 +504,7 @@ public function getHistogramWithHttpInfo($email_ids = null, $end_timestamp = nul } return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval', + '\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics', $request, $response, ); @@ -562,7 +513,7 @@ public function getHistogramWithHttpInfo($email_ids = null, $end_timestamp = nul case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval', + '\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -583,22 +534,22 @@ public function getHistogramWithHttpInfo($email_ids = null, $end_timestamp = nul } /** - * Operation getHistogramAsync + * Operation getEmailsListAsync * - * Get aggregated statistic intervals + * Get aggregated statistics * - * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) - * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) - * @param string|null $interval The interval to aggregate statistics for. (optional) * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHistogram'] to see the possible values for this operation + * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) + * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) + * @param string|null $property Specifies which email properties should be returned. All properties will be returned by default. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailsList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getHistogramAsync($email_ids = null, $end_timestamp = null, $interval = null, $start_timestamp = null, string $contentType = self::contentTypes['getHistogram'][0]) + public function getEmailsListAsync($start_timestamp = null, $end_timestamp = null, $email_ids = null, $property = null, string $contentType = self::contentTypes['getEmailsList'][0]) { - return $this->getHistogramAsyncWithHttpInfo($email_ids, $end_timestamp, $interval, $start_timestamp, $contentType) + return $this->getEmailsListAsyncWithHttpInfo($start_timestamp, $end_timestamp, $email_ids, $property, $contentType) ->then( function ($response) { return $response[0]; @@ -607,23 +558,23 @@ function ($response) { } /** - * Operation getHistogramAsyncWithHttpInfo + * Operation getEmailsListAsyncWithHttpInfo * - * Get aggregated statistic intervals + * Get aggregated statistics * - * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) - * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) - * @param string|null $interval The interval to aggregate statistics for. (optional) * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHistogram'] to see the possible values for this operation + * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) + * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) + * @param string|null $property Specifies which email properties should be returned. All properties will be returned by default. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailsList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getHistogramAsyncWithHttpInfo($email_ids = null, $end_timestamp = null, $interval = null, $start_timestamp = null, string $contentType = self::contentTypes['getHistogram'][0]) + public function getEmailsListAsyncWithHttpInfo($start_timestamp = null, $end_timestamp = null, $email_ids = null, $property = null, string $contentType = self::contentTypes['getEmailsList'][0]) { - $returnType = '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval'; - $request = $this->getHistogramRequest($email_ids, $end_timestamp, $interval, $start_timestamp, $contentType); + $returnType = '\HubSpot\Client\Marketing\Emails\Model\AggregateEmailStatistics'; + $request = $this->getEmailsListRequest($start_timestamp, $end_timestamp, $email_ids, $property, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -662,18 +613,18 @@ function ($exception) { } /** - * Create request for operation 'getHistogram' + * Create request for operation 'getEmailsList' * - * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) - * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) - * @param string|null $interval The interval to aggregate statistics for. (optional) * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHistogram'] to see the possible values for this operation + * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) + * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) + * @param string|null $property Specifies which email properties should be returned. All properties will be returned by default. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getEmailsList'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getHistogramRequest($email_ids = null, $end_timestamp = null, $interval = null, $start_timestamp = null, string $contentType = self::contentTypes['getHistogram'][0]) + public function getEmailsListRequest($start_timestamp = null, $end_timestamp = null, $email_ids = null, $property = null, string $contentType = self::contentTypes['getEmailsList'][0]) { @@ -681,7 +632,7 @@ public function getHistogramRequest($email_ids = null, $end_timestamp = null, $i - $resourcePath = '/marketing/v3/emails/statistics/histogram'; + $resourcePath = '/marketing/v3/emails/statistics/list'; $formParams = []; $queryParams = []; $headerParams = []; @@ -690,9 +641,9 @@ public function getHistogramRequest($email_ids = null, $end_timestamp = null, $i // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $email_ids, - 'emailIds', // param base name - 'array', // openApiType + $start_timestamp, + 'startTimestamp', // param base name + 'string', // openApiType 'form', // style true, // explode false // required @@ -708,17 +659,17 @@ public function getHistogramRequest($email_ids = null, $end_timestamp = null, $i ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $interval, - 'interval', // param base name - 'string', // openApiType + $email_ids, + 'emailIds', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $start_timestamp, - 'startTimestamp', // param base name + $property, + 'property', // param base name 'string', // openApiType 'form', // style true, // explode @@ -786,74 +737,44 @@ public function getHistogramRequest($email_ids = null, $end_timestamp = null, $i } /** - * Operation marketingV3Emails + * Operation getHistogram * - * @param string|null $after after (optional) - * @param bool|null $archived archived (optional) - * @param string|null $campaign campaign (optional) - * @param \DateTime|null $created_after created_after (optional) - * @param \DateTime|null $created_at created_at (optional) - * @param \DateTime|null $created_before created_before (optional) - * @param string[]|null $included_properties included_properties (optional) - * @param bool|null $include_stats include_stats (optional) - * @param bool|null $is_published is_published (optional) - * @param int|null $limit limit (optional) - * @param bool|null $marketing_campaign_names marketing_campaign_names (optional) - * @param \DateTime|null $published_after published_after (optional) - * @param \DateTime|null $published_at published_at (optional) - * @param \DateTime|null $published_before published_before (optional) - * @param string[]|null $sort sort (optional) - * @param string|null $type type (optional) - * @param \DateTime|null $updated_after updated_after (optional) - * @param \DateTime|null $updated_at updated_at (optional) - * @param \DateTime|null $updated_before updated_before (optional) - * @param bool|null $variant_stats variant_stats (optional) - * @param bool|null $workflow_names workflow_names (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Emails'] to see the possible values for this operation + * Get aggregated statistic intervals + * + * @param string|null $interval The interval to aggregate statistics for. (optional) + * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) + * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) + * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHistogram'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error + * @return \HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval|\HubSpot\Client\Marketing\Emails\Model\Error */ - public function marketingV3Emails($after = null, $archived = null, $campaign = null, $created_after = null, $created_at = null, $created_before = null, $included_properties = null, $include_stats = null, $is_published = null, $limit = null, $marketing_campaign_names = null, $published_after = null, $published_at = null, $published_before = null, $sort = null, $type = null, $updated_after = null, $updated_at = null, $updated_before = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['marketingV3Emails'][0]) + public function getHistogram($interval = null, $start_timestamp = null, $end_timestamp = null, $email_ids = null, string $contentType = self::contentTypes['getHistogram'][0]) { - list($response) = $this->marketingV3EmailsWithHttpInfo($after, $archived, $campaign, $created_after, $created_at, $created_before, $included_properties, $include_stats, $is_published, $limit, $marketing_campaign_names, $published_after, $published_at, $published_before, $sort, $type, $updated_after, $updated_at, $updated_before, $variant_stats, $workflow_names, $contentType); + list($response) = $this->getHistogramWithHttpInfo($interval, $start_timestamp, $end_timestamp, $email_ids, $contentType); return $response; } /** - * Operation marketingV3EmailsWithHttpInfo + * Operation getHistogramWithHttpInfo * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param string|null $campaign (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param string[]|null $included_properties (optional) - * @param bool|null $include_stats (optional) - * @param bool|null $is_published (optional) - * @param int|null $limit (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param \DateTime|null $published_after (optional) - * @param \DateTime|null $published_at (optional) - * @param \DateTime|null $published_before (optional) - * @param string[]|null $sort (optional) - * @param string|null $type (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param bool|null $variant_stats (optional) - * @param bool|null $workflow_names (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Emails'] to see the possible values for this operation + * Get aggregated statistic intervals + * + * @param string|null $interval The interval to aggregate statistics for. (optional) + * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) + * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) + * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHistogram'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function marketingV3EmailsWithHttpInfo($after = null, $archived = null, $campaign = null, $created_after = null, $created_at = null, $created_before = null, $included_properties = null, $include_stats = null, $is_published = null, $limit = null, $marketing_campaign_names = null, $published_after = null, $published_at = null, $published_before = null, $sort = null, $type = null, $updated_after = null, $updated_at = null, $updated_before = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['marketingV3Emails'][0]) + public function getHistogramWithHttpInfo($interval = null, $start_timestamp = null, $end_timestamp = null, $email_ids = null, string $contentType = self::contentTypes['getHistogram'][0]) { - $request = $this->marketingV3EmailsRequest($after, $archived, $campaign, $created_after, $created_at, $created_before, $included_properties, $include_stats, $is_published, $limit, $marketing_campaign_names, $published_after, $published_at, $published_before, $sort, $type, $updated_after, $updated_at, $updated_before, $variant_stats, $workflow_names, $contentType); + $request = $this->getHistogramRequest($interval, $start_timestamp, $end_timestamp, $email_ids, $contentType); try { $options = $this->createHttpClientOption(); @@ -881,7 +802,7 @@ public function marketingV3EmailsWithHttpInfo($after = null, $archived = null, $ switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail', + '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval', $request, $response, ); @@ -909,7 +830,7 @@ public function marketingV3EmailsWithHttpInfo($after = null, $archived = null, $ } return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail', + '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval', $request, $response, ); @@ -918,7 +839,7 @@ public function marketingV3EmailsWithHttpInfo($after = null, $archived = null, $ case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail', + '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -939,37 +860,22 @@ public function marketingV3EmailsWithHttpInfo($after = null, $archived = null, $ } /** - * Operation marketingV3EmailsAsync + * Operation getHistogramAsync * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param string|null $campaign (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param string[]|null $included_properties (optional) - * @param bool|null $include_stats (optional) - * @param bool|null $is_published (optional) - * @param int|null $limit (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param \DateTime|null $published_after (optional) - * @param \DateTime|null $published_at (optional) - * @param \DateTime|null $published_before (optional) - * @param string[]|null $sort (optional) - * @param string|null $type (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param bool|null $variant_stats (optional) - * @param bool|null $workflow_names (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Emails'] to see the possible values for this operation + * Get aggregated statistic intervals + * + * @param string|null $interval The interval to aggregate statistics for. (optional) + * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) + * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) + * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHistogram'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function marketingV3EmailsAsync($after = null, $archived = null, $campaign = null, $created_after = null, $created_at = null, $created_before = null, $included_properties = null, $include_stats = null, $is_published = null, $limit = null, $marketing_campaign_names = null, $published_after = null, $published_at = null, $published_before = null, $sort = null, $type = null, $updated_after = null, $updated_at = null, $updated_before = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['marketingV3Emails'][0]) + public function getHistogramAsync($interval = null, $start_timestamp = null, $end_timestamp = null, $email_ids = null, string $contentType = self::contentTypes['getHistogram'][0]) { - return $this->marketingV3EmailsAsyncWithHttpInfo($after, $archived, $campaign, $created_after, $created_at, $created_before, $included_properties, $include_stats, $is_published, $limit, $marketing_campaign_names, $published_after, $published_at, $published_before, $sort, $type, $updated_after, $updated_at, $updated_before, $variant_stats, $workflow_names, $contentType) + return $this->getHistogramAsyncWithHttpInfo($interval, $start_timestamp, $end_timestamp, $email_ids, $contentType) ->then( function ($response) { return $response[0]; @@ -978,38 +884,23 @@ function ($response) { } /** - * Operation marketingV3EmailsAsyncWithHttpInfo + * Operation getHistogramAsyncWithHttpInfo * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param string|null $campaign (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param string[]|null $included_properties (optional) - * @param bool|null $include_stats (optional) - * @param bool|null $is_published (optional) - * @param int|null $limit (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param \DateTime|null $published_after (optional) - * @param \DateTime|null $published_at (optional) - * @param \DateTime|null $published_before (optional) - * @param string[]|null $sort (optional) - * @param string|null $type (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param bool|null $variant_stats (optional) - * @param bool|null $workflow_names (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Emails'] to see the possible values for this operation + * Get aggregated statistic intervals + * + * @param string|null $interval The interval to aggregate statistics for. (optional) + * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) + * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) + * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHistogram'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function marketingV3EmailsAsyncWithHttpInfo($after = null, $archived = null, $campaign = null, $created_after = null, $created_at = null, $created_before = null, $included_properties = null, $include_stats = null, $is_published = null, $limit = null, $marketing_campaign_names = null, $published_after = null, $published_at = null, $published_before = null, $sort = null, $type = null, $updated_after = null, $updated_at = null, $updated_before = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['marketingV3Emails'][0]) + public function getHistogramAsyncWithHttpInfo($interval = null, $start_timestamp = null, $end_timestamp = null, $email_ids = null, string $contentType = self::contentTypes['getHistogram'][0]) { - $returnType = '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail'; - $request = $this->marketingV3EmailsRequest($after, $archived, $campaign, $created_after, $created_at, $created_before, $included_properties, $include_stats, $is_published, $limit, $marketing_campaign_names, $published_after, $published_at, $published_before, $sort, $type, $updated_after, $updated_at, $updated_before, $variant_stats, $workflow_names, $contentType); + $returnType = '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalEmailStatisticInterval'; + $request = $this->getHistogramRequest($interval, $start_timestamp, $end_timestamp, $email_ids, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1048,35 +939,18 @@ function ($exception) { } /** - * Create request for operation 'marketingV3Emails' + * Create request for operation 'getHistogram' * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param string|null $campaign (optional) - * @param \DateTime|null $created_after (optional) - * @param \DateTime|null $created_at (optional) - * @param \DateTime|null $created_before (optional) - * @param string[]|null $included_properties (optional) - * @param bool|null $include_stats (optional) - * @param bool|null $is_published (optional) - * @param int|null $limit (optional) - * @param bool|null $marketing_campaign_names (optional) - * @param \DateTime|null $published_after (optional) - * @param \DateTime|null $published_at (optional) - * @param \DateTime|null $published_before (optional) - * @param string[]|null $sort (optional) - * @param string|null $type (optional) - * @param \DateTime|null $updated_after (optional) - * @param \DateTime|null $updated_at (optional) - * @param \DateTime|null $updated_before (optional) - * @param bool|null $variant_stats (optional) - * @param bool|null $workflow_names (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Emails'] to see the possible values for this operation + * @param string|null $interval The interval to aggregate statistics for. (optional) + * @param \DateTime|null $start_timestamp The start timestamp of the time span, in ISO8601 representation. (optional) + * @param \DateTime|null $end_timestamp The end timestamp of the time span, in ISO8601 representation. (optional) + * @param int[]|null $email_ids Filter by email IDs. Only include statistics of emails with these IDs. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getHistogram'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function marketingV3EmailsRequest($after = null, $archived = null, $campaign = null, $created_after = null, $created_at = null, $created_before = null, $included_properties = null, $include_stats = null, $is_published = null, $limit = null, $marketing_campaign_names = null, $published_after = null, $published_at = null, $published_before = null, $sort = null, $type = null, $updated_after = null, $updated_at = null, $updated_before = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['marketingV3Emails'][0]) + public function getHistogramRequest($interval = null, $start_timestamp = null, $end_timestamp = null, $email_ids = null, string $contentType = self::contentTypes['getHistogram'][0]) { @@ -1084,24 +958,7 @@ public function marketingV3EmailsRequest($after = null, $archived = null, $campa - - - - - - - - - - - - - - - - - - $resourcePath = '/marketing/v3/emails'; + $resourcePath = '/marketing/v3/emails/statistics/histogram'; $formParams = []; $queryParams = []; $headerParams = []; @@ -1110,107 +967,8 @@ public function marketingV3EmailsRequest($after = null, $archived = null, $campa // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $campaign, - 'campaign', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_after, - 'createdAfter', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_at, - 'createdAt', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $created_before, - 'createdBefore', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $included_properties, - 'includedProperties', // param base name - 'array', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include_stats, - 'includeStats', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $is_published, - 'isPublished', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $marketing_campaign_names, - 'marketingCampaignNames', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $published_after, - 'publishedAfter', // param base name + $interval, + 'interval', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1218,8 +976,8 @@ public function marketingV3EmailsRequest($after = null, $archived = null, $campa ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $published_at, - 'publishedAt', // param base name + $start_timestamp, + 'startTimestamp', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1227,8 +985,8 @@ public function marketingV3EmailsRequest($after = null, $archived = null, $campa ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $published_before, - 'publishedBefore', // param base name + $end_timestamp, + 'endTimestamp', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1236,67 +994,13 @@ public function marketingV3EmailsRequest($after = null, $archived = null, $campa ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $sort, - 'sort', // param base name + $email_ids, + 'emailIds', // param base name 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $type, - 'type', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_after, - 'updatedAfter', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_at, - 'updatedAt', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $updated_before, - 'updatedBefore', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $variant_stats, - 'variantStats', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $workflow_names, - 'workflowNames', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); @@ -1359,34 +1063,74 @@ public function marketingV3EmailsRequest($after = null, $archived = null, $campa } /** - * Operation marketingV3Emails_0 + * Operation getPage * - * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request email_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Emails_0'] to see the possible values for this operation + * @param \DateTime|null $created_at created_at (optional) + * @param \DateTime|null $created_after created_after (optional) + * @param \DateTime|null $created_before created_before (optional) + * @param \DateTime|null $updated_at updated_at (optional) + * @param \DateTime|null $updated_after updated_after (optional) + * @param \DateTime|null $updated_before updated_before (optional) + * @param string[]|null $sort sort (optional) + * @param string|null $after after (optional) + * @param int|null $limit limit (optional) + * @param bool|null $include_stats include_stats (optional) + * @param bool|null $marketing_campaign_names marketing_campaign_names (optional) + * @param bool|null $workflow_names workflow_names (optional) + * @param string|null $type type (optional) + * @param bool|null $is_published is_published (optional) + * @param string[]|null $included_properties included_properties (optional) + * @param bool|null $archived archived (optional) + * @param string|null $campaign campaign (optional) + * @param \DateTime|null $published_after published_after (optional) + * @param \DateTime|null $published_at published_at (optional) + * @param \DateTime|null $published_before published_before (optional) + * @param bool|null $variant_stats variant_stats (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error + * @return \HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error */ - public function marketingV3Emails_0($email_create_request, string $contentType = self::contentTypes['marketingV3Emails_0'][0]) + public function getPage($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, $campaign = null, $published_after = null, $published_at = null, $published_before = null, $variant_stats = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->marketingV3Emails_0WithHttpInfo($email_create_request, $contentType); + list($response) = $this->getPageWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $campaign, $published_after, $published_at, $published_before, $variant_stats, $contentType); return $response; } /** - * Operation marketingV3Emails_0WithHttpInfo + * Operation getPageWithHttpInfo * - * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Emails_0'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $include_stats (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) + * @param string|null $type (optional) + * @param bool|null $is_published (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $archived (optional) + * @param string|null $campaign (optional) + * @param \DateTime|null $published_after (optional) + * @param \DateTime|null $published_at (optional) + * @param \DateTime|null $published_before (optional) + * @param bool|null $variant_stats (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function marketingV3Emails_0WithHttpInfo($email_create_request, string $contentType = self::contentTypes['marketingV3Emails_0'][0]) + public function getPageWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, $campaign = null, $published_after = null, $published_at = null, $published_before = null, $variant_stats = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->marketingV3Emails_0Request($email_create_request, $contentType); + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $campaign, $published_after, $published_at, $published_before, $variant_stats, $contentType); try { $options = $this->createHttpClientOption(); @@ -1412,9 +1156,9 @@ public function marketingV3Emails_0WithHttpInfo($email_create_request, string $c switch($statusCode) { - case 201: + case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail', $request, $response, ); @@ -1442,16 +1186,16 @@ public function marketingV3Emails_0WithHttpInfo($email_create_request, string $c } return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Marketing\Emails\Model\PublicEmail', + '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1472,17 +1216,37 @@ public function marketingV3Emails_0WithHttpInfo($email_create_request, string $c } /** - * Operation marketingV3Emails_0Async + * Operation getPageAsync * - * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Emails_0'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $include_stats (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) + * @param string|null $type (optional) + * @param bool|null $is_published (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $archived (optional) + * @param string|null $campaign (optional) + * @param \DateTime|null $published_after (optional) + * @param \DateTime|null $published_at (optional) + * @param \DateTime|null $published_before (optional) + * @param bool|null $variant_stats (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function marketingV3Emails_0Async($email_create_request, string $contentType = self::contentTypes['marketingV3Emails_0'][0]) + public function getPageAsync($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, $campaign = null, $published_after = null, $published_at = null, $published_before = null, $variant_stats = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->marketingV3Emails_0AsyncWithHttpInfo($email_create_request, $contentType) + return $this->getPageAsyncWithHttpInfo($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $campaign, $published_after, $published_at, $published_before, $variant_stats, $contentType) ->then( function ($response) { return $response[0]; @@ -1491,18 +1255,38 @@ function ($response) { } /** - * Operation marketingV3Emails_0AsyncWithHttpInfo + * Operation getPageAsyncWithHttpInfo * - * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Emails_0'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $include_stats (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) + * @param string|null $type (optional) + * @param bool|null $is_published (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $archived (optional) + * @param string|null $campaign (optional) + * @param \DateTime|null $published_after (optional) + * @param \DateTime|null $published_at (optional) + * @param \DateTime|null $published_before (optional) + * @param bool|null $variant_stats (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function marketingV3Emails_0AsyncWithHttpInfo($email_create_request, string $contentType = self::contentTypes['marketingV3Emails_0'][0]) + public function getPageAsyncWithHttpInfo($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, $campaign = null, $published_after = null, $published_at = null, $published_before = null, $variant_stats = null, string $contentType = self::contentTypes['getPage'][0]) { - $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - $request = $this->marketingV3Emails_0Request($email_create_request, $contentType); + $returnType = '\HubSpot\Client\Marketing\Emails\Model\CollectionResponseWithTotalPublicEmail'; + $request = $this->getPageRequest($created_at, $created_after, $created_before, $updated_at, $updated_after, $updated_before, $sort, $after, $limit, $include_stats, $marketing_campaign_names, $workflow_names, $type, $is_published, $included_properties, $archived, $campaign, $published_after, $published_at, $published_before, $variant_stats, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1541,23 +1325,57 @@ function ($exception) { } /** - * Create request for operation 'marketingV3Emails_0' + * Create request for operation 'getPage' * - * @param \HubSpot\Client\Marketing\Emails\Model\EmailCreateRequest $email_create_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Emails_0'] to see the possible values for this operation + * @param \DateTime|null $created_at (optional) + * @param \DateTime|null $created_after (optional) + * @param \DateTime|null $created_before (optional) + * @param \DateTime|null $updated_at (optional) + * @param \DateTime|null $updated_after (optional) + * @param \DateTime|null $updated_before (optional) + * @param string[]|null $sort (optional) + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $include_stats (optional) + * @param bool|null $marketing_campaign_names (optional) + * @param bool|null $workflow_names (optional) + * @param string|null $type (optional) + * @param bool|null $is_published (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $archived (optional) + * @param string|null $campaign (optional) + * @param \DateTime|null $published_after (optional) + * @param \DateTime|null $published_at (optional) + * @param \DateTime|null $published_before (optional) + * @param bool|null $variant_stats (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function marketingV3Emails_0Request($email_create_request, string $contentType = self::contentTypes['marketingV3Emails_0'][0]) + public function getPageRequest($created_at = null, $created_after = null, $created_before = null, $updated_at = null, $updated_after = null, $updated_before = null, $sort = null, $after = null, $limit = null, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $type = null, $is_published = null, $included_properties = null, $archived = null, $campaign = null, $published_after = null, $published_at = null, $published_before = null, $variant_stats = null, string $contentType = self::contentTypes['getPage'][0]) { - // verify the required parameter 'email_create_request' is set - if ($email_create_request === null || (is_array($email_create_request) && count($email_create_request) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $email_create_request when calling marketingV3Emails_0' - ); - } + + + + + + + + + + + + + + + + + + + + $resourcePath = '/marketing/v3/emails'; @@ -1567,6 +1385,195 @@ public function marketingV3Emails_0Request($email_create_request, string $conten $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_at, + 'createdAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_after, + 'createdAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $created_before, + 'createdBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_at, + 'updatedAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_after, + 'updatedAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $updated_before, + 'updatedBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $sort, + 'sort', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $include_stats, + 'includeStats', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $marketing_campaign_names, + 'marketingCampaignNames', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $workflow_names, + 'workflowNames', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $type, + 'type', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $is_published, + 'isPublished', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $included_properties, + 'includedProperties', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $campaign, + 'campaign', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $published_after, + 'publishedAfter', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $published_at, + 'publishedAt', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $published_before, + 'publishedBefore', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $variant_stats, + 'variantStats', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); @@ -1578,14 +1585,7 @@ public function marketingV3Emails_0Request($email_create_request, string $conten ); // for model (json/xml) - if (isset($email_create_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($email_create_request), JSON_THROW_ON_ERROR); - } else { - $httpBody = $email_create_request; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1628,7 +1628,7 @@ public function marketingV3Emails_0Request($email_create_request, string $conten $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/codegen/Marketing/Emails/Api/EmailsApi.php b/codegen/Marketing/Emails/Api/EmailsApi.php index 0bd95741..c57a6fd3 100644 --- a/codegen/Marketing/Emails/Api/EmailsApi.php +++ b/codegen/Marketing/Emails/Api/EmailsApi.php @@ -1363,21 +1363,21 @@ public function getAbTestVariationRequest($email_id, $archived = null, $included * Get the details of a specified marketing email * * @param string $email_id The marketing email ID. (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string[]|null $included_properties (optional) * @param bool|null $include_stats Include statistics with email (optional) * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $variant_stats (optional) * @param bool|null $workflow_names (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $variant_stats (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error */ - public function getById($email_id, $archived = null, $included_properties = null, $include_stats = null, $marketing_campaign_names = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['getById'][0]) + public function getById($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, $variant_stats = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($email_id, $archived, $included_properties, $include_stats, $marketing_campaign_names, $variant_stats, $workflow_names, $contentType); + list($response) = $this->getByIdWithHttpInfo($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $variant_stats, $contentType); return $response; } @@ -1387,21 +1387,21 @@ public function getById($email_id, $archived = null, $included_properties = null * Get the details of a specified marketing email * * @param string $email_id The marketing email ID. (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string[]|null $included_properties (optional) * @param bool|null $include_stats Include statistics with email (optional) * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $variant_stats (optional) * @param bool|null $workflow_names (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $variant_stats (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Emails\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Emails\Model\PublicEmail|\HubSpot\Client\Marketing\Emails\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($email_id, $archived = null, $included_properties = null, $include_stats = null, $marketing_campaign_names = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, $variant_stats = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($email_id, $archived, $included_properties, $include_stats, $marketing_campaign_names, $variant_stats, $workflow_names, $contentType); + $request = $this->getByIdRequest($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $variant_stats, $contentType); try { $options = $this->createHttpClientOption(); @@ -1492,20 +1492,20 @@ public function getByIdWithHttpInfo($email_id, $archived = null, $included_prope * Get the details of a specified marketing email * * @param string $email_id The marketing email ID. (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string[]|null $included_properties (optional) * @param bool|null $include_stats Include statistics with email (optional) * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $variant_stats (optional) * @param bool|null $workflow_names (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $variant_stats (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($email_id, $archived = null, $included_properties = null, $include_stats = null, $marketing_campaign_names = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, $variant_stats = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($email_id, $archived, $included_properties, $include_stats, $marketing_campaign_names, $variant_stats, $workflow_names, $contentType) + return $this->getByIdAsyncWithHttpInfo($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $variant_stats, $contentType) ->then( function ($response) { return $response[0]; @@ -1519,21 +1519,21 @@ function ($response) { * Get the details of a specified marketing email * * @param string $email_id The marketing email ID. (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string[]|null $included_properties (optional) * @param bool|null $include_stats Include statistics with email (optional) * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $variant_stats (optional) * @param bool|null $workflow_names (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $variant_stats (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($email_id, $archived = null, $included_properties = null, $include_stats = null, $marketing_campaign_names = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, $variant_stats = null, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Marketing\Emails\Model\PublicEmail'; - $request = $this->getByIdRequest($email_id, $archived, $included_properties, $include_stats, $marketing_campaign_names, $variant_stats, $workflow_names, $contentType); + $request = $this->getByIdRequest($email_id, $include_stats, $marketing_campaign_names, $workflow_names, $included_properties, $archived, $variant_stats, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1575,18 +1575,18 @@ function ($exception) { * Create request for operation 'getById' * * @param string $email_id The marketing email ID. (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string[]|null $included_properties (optional) * @param bool|null $include_stats Include statistics with email (optional) * @param bool|null $marketing_campaign_names (optional) - * @param bool|null $variant_stats (optional) * @param bool|null $workflow_names (optional) + * @param string[]|null $included_properties (optional) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param bool|null $variant_stats (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($email_id, $archived = null, $included_properties = null, $include_stats = null, $marketing_campaign_names = null, $variant_stats = null, $workflow_names = null, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($email_id, $include_stats = null, $marketing_campaign_names = null, $workflow_names = null, $included_properties = null, $archived = null, $variant_stats = null, string $contentType = self::contentTypes['getById'][0]) { // verify the required parameter 'email_id' is set @@ -1612,8 +1612,8 @@ public function getByIdRequest($email_id, $archived = null, $included_properties // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name + $include_stats, + 'includeStats', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -1621,17 +1621,17 @@ public function getByIdRequest($email_id, $archived = null, $included_properties ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $included_properties, - 'includedProperties', // param base name - 'array', // openApiType + $marketing_campaign_names, + 'marketingCampaignNames', // param base name + 'boolean', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $include_stats, - 'includeStats', // param base name + $workflow_names, + 'workflowNames', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -1639,17 +1639,17 @@ public function getByIdRequest($email_id, $archived = null, $included_properties ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $marketing_campaign_names, - 'marketingCampaignNames', // param base name - 'boolean', // openApiType + $included_properties, + 'includedProperties', // param base name + 'array', // openApiType 'form', // style true, // explode false // required ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $variant_stats, - 'variantStats', // param base name + $archived, + 'archived', // param base name 'boolean', // openApiType 'form', // style true, // explode @@ -1657,8 +1657,8 @@ public function getByIdRequest($email_id, $archived = null, $included_properties ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $workflow_names, - 'workflowNames', // param base name + $variant_stats, + 'variantStats', // param base name 'boolean', // openApiType 'form', // style true, // explode diff --git a/codegen/Marketing/Events/Api/BasicApi.php b/codegen/Marketing/Events/Api/BasicApi.php index e61bfc96..53d4943c 100644 --- a/codegen/Marketing/Events/Api/BasicApi.php +++ b/codegen/Marketing/Events/Api/BasicApi.php @@ -88,7 +88,7 @@ class BasicApi 'getDetails' => [ 'application/json', ], - 'marketingMarketingEventsV3' => [ + 'getPage' => [ 'application/json', ], 'update' => [ @@ -1508,36 +1508,36 @@ public function getDetailsRequest($external_event_id, $external_account_id, stri } /** - * Operation marketingMarketingEventsV3 + * Operation getPage * * @param string|null $after after (optional) * @param int|null $limit limit (optional, default to 10) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingMarketingEventsV3'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Events\Model\CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging|\HubSpot\Client\Marketing\Events\Model\Error */ - public function marketingMarketingEventsV3($after = null, $limit = 10, string $contentType = self::contentTypes['marketingMarketingEventsV3'][0]) + public function getPage($after = null, $limit = 10, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->marketingMarketingEventsV3WithHttpInfo($after, $limit, $contentType); + list($response) = $this->getPageWithHttpInfo($after, $limit, $contentType); return $response; } /** - * Operation marketingMarketingEventsV3WithHttpInfo + * Operation getPageWithHttpInfo * * @param string|null $after (optional) * @param int|null $limit (optional, default to 10) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingMarketingEventsV3'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Events\Model\CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging|\HubSpot\Client\Marketing\Events\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function marketingMarketingEventsV3WithHttpInfo($after = null, $limit = 10, string $contentType = self::contentTypes['marketingMarketingEventsV3'][0]) + public function getPageWithHttpInfo($after = null, $limit = 10, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->marketingMarketingEventsV3Request($after, $limit, $contentType); + $request = $this->getPageRequest($after, $limit, $contentType); try { $options = $this->createHttpClientOption(); @@ -1623,18 +1623,18 @@ public function marketingMarketingEventsV3WithHttpInfo($after = null, $limit = 1 } /** - * Operation marketingMarketingEventsV3Async + * Operation getPageAsync * * @param string|null $after (optional) * @param int|null $limit (optional, default to 10) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingMarketingEventsV3'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function marketingMarketingEventsV3Async($after = null, $limit = 10, string $contentType = self::contentTypes['marketingMarketingEventsV3'][0]) + public function getPageAsync($after = null, $limit = 10, string $contentType = self::contentTypes['getPage'][0]) { - return $this->marketingMarketingEventsV3AsyncWithHttpInfo($after, $limit, $contentType) + return $this->getPageAsyncWithHttpInfo($after, $limit, $contentType) ->then( function ($response) { return $response[0]; @@ -1643,19 +1643,19 @@ function ($response) { } /** - * Operation marketingMarketingEventsV3AsyncWithHttpInfo + * Operation getPageAsyncWithHttpInfo * * @param string|null $after (optional) * @param int|null $limit (optional, default to 10) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingMarketingEventsV3'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function marketingMarketingEventsV3AsyncWithHttpInfo($after = null, $limit = 10, string $contentType = self::contentTypes['marketingMarketingEventsV3'][0]) + public function getPageAsyncWithHttpInfo($after = null, $limit = 10, string $contentType = self::contentTypes['getPage'][0]) { $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseMarketingEventPublicReadResponseV2ForwardPaging'; - $request = $this->marketingMarketingEventsV3Request($after, $limit, $contentType); + $request = $this->getPageRequest($after, $limit, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1694,16 +1694,16 @@ function ($exception) { } /** - * Create request for operation 'marketingMarketingEventsV3' + * Create request for operation 'getPage' * * @param string|null $after (optional) * @param int|null $limit (optional, default to 10) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingMarketingEventsV3'] to see the possible values for this operation + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function marketingMarketingEventsV3Request($after = null, $limit = 10, string $contentType = self::contentTypes['marketingMarketingEventsV3'][0]) + public function getPageRequest($after = null, $limit = 10, string $contentType = self::contentTypes['getPage'][0]) { diff --git a/codegen/Marketing/Events/Api/ParticipantStateApi.php b/codegen/Marketing/Events/Api/ParticipantStateApi.php index be205bd2..9d21079c 100644 --- a/codegen/Marketing/Events/Api/ParticipantStateApi.php +++ b/codegen/Marketing/Events/Api/ParticipantStateApi.php @@ -142,18 +142,18 @@ public function getConfig() * Read participations breakdown by Contact identifier * * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByContactId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdown|\HubSpot\Client\Marketing\Events\Model\Error */ - public function getParticipationsBreakdownByContactId($contact_identifier, $after = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByContactId'][0]) + public function getParticipationsBreakdownByContactId($contact_identifier, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByContactId'][0]) { - list($response) = $this->getParticipationsBreakdownByContactIdWithHttpInfo($contact_identifier, $after, $limit, $state, $contentType); + list($response) = $this->getParticipationsBreakdownByContactIdWithHttpInfo($contact_identifier, $state, $limit, $after, $contentType); return $response; } @@ -163,18 +163,18 @@ public function getParticipationsBreakdownByContactId($contact_identifier, $afte * Read participations breakdown by Contact identifier * * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByContactId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdown|\HubSpot\Client\Marketing\Events\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getParticipationsBreakdownByContactIdWithHttpInfo($contact_identifier, $after = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByContactId'][0]) + public function getParticipationsBreakdownByContactIdWithHttpInfo($contact_identifier, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByContactId'][0]) { - $request = $this->getParticipationsBreakdownByContactIdRequest($contact_identifier, $after, $limit, $state, $contentType); + $request = $this->getParticipationsBreakdownByContactIdRequest($contact_identifier, $state, $limit, $after, $contentType); try { $options = $this->createHttpClientOption(); @@ -265,17 +265,17 @@ public function getParticipationsBreakdownByContactIdWithHttpInfo($contact_ident * Read participations breakdown by Contact identifier * * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByContactId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getParticipationsBreakdownByContactIdAsync($contact_identifier, $after = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByContactId'][0]) + public function getParticipationsBreakdownByContactIdAsync($contact_identifier, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByContactId'][0]) { - return $this->getParticipationsBreakdownByContactIdAsyncWithHttpInfo($contact_identifier, $after, $limit, $state, $contentType) + return $this->getParticipationsBreakdownByContactIdAsyncWithHttpInfo($contact_identifier, $state, $limit, $after, $contentType) ->then( function ($response) { return $response[0]; @@ -289,18 +289,18 @@ function ($response) { * Read participations breakdown by Contact identifier * * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByContactId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getParticipationsBreakdownByContactIdAsyncWithHttpInfo($contact_identifier, $after = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByContactId'][0]) + public function getParticipationsBreakdownByContactIdAsyncWithHttpInfo($contact_identifier, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByContactId'][0]) { $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdown'; - $request = $this->getParticipationsBreakdownByContactIdRequest($contact_identifier, $after, $limit, $state, $contentType); + $request = $this->getParticipationsBreakdownByContactIdRequest($contact_identifier, $state, $limit, $after, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -342,15 +342,15 @@ function ($exception) { * Create request for operation 'getParticipationsBreakdownByContactId' * * @param string $contact_identifier The identifier of the Contact. It may be email or internal id. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByContactId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getParticipationsBreakdownByContactIdRequest($contact_identifier, $after = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByContactId'][0]) + public function getParticipationsBreakdownByContactIdRequest($contact_identifier, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByContactId'][0]) { // verify the required parameter 'contact_identifier' is set @@ -373,8 +373,8 @@ public function getParticipationsBreakdownByContactIdRequest($contact_identifier // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $state, + 'state', // param base name 'string', // openApiType 'form', // style true, // explode @@ -391,8 +391,8 @@ public function getParticipationsBreakdownByContactIdRequest($contact_identifier ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $state, - 'state', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode @@ -474,19 +474,19 @@ public function getParticipationsBreakdownByContactIdRequest($contact_identifier * * @param string $external_account_id The accountId that is associated with this marketing event in the external event application. (required) * @param string $external_event_id The id of the marketing event in the external event application. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByExternalEventId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdown|\HubSpot\Client\Marketing\Events\Model\Error */ - public function getParticipationsBreakdownByExternalEventId($external_account_id, $external_event_id, $after = null, $contact_identifier = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByExternalEventId'][0]) + public function getParticipationsBreakdownByExternalEventId($external_account_id, $external_event_id, $contact_identifier = null, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByExternalEventId'][0]) { - list($response) = $this->getParticipationsBreakdownByExternalEventIdWithHttpInfo($external_account_id, $external_event_id, $after, $contact_identifier, $limit, $state, $contentType); + list($response) = $this->getParticipationsBreakdownByExternalEventIdWithHttpInfo($external_account_id, $external_event_id, $contact_identifier, $state, $limit, $after, $contentType); return $response; } @@ -497,19 +497,19 @@ public function getParticipationsBreakdownByExternalEventId($external_account_id * * @param string $external_account_id The accountId that is associated with this marketing event in the external event application. (required) * @param string $external_event_id The id of the marketing event in the external event application. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByExternalEventId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdown|\HubSpot\Client\Marketing\Events\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getParticipationsBreakdownByExternalEventIdWithHttpInfo($external_account_id, $external_event_id, $after = null, $contact_identifier = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByExternalEventId'][0]) + public function getParticipationsBreakdownByExternalEventIdWithHttpInfo($external_account_id, $external_event_id, $contact_identifier = null, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByExternalEventId'][0]) { - $request = $this->getParticipationsBreakdownByExternalEventIdRequest($external_account_id, $external_event_id, $after, $contact_identifier, $limit, $state, $contentType); + $request = $this->getParticipationsBreakdownByExternalEventIdRequest($external_account_id, $external_event_id, $contact_identifier, $state, $limit, $after, $contentType); try { $options = $this->createHttpClientOption(); @@ -601,18 +601,18 @@ public function getParticipationsBreakdownByExternalEventIdWithHttpInfo($externa * * @param string $external_account_id The accountId that is associated with this marketing event in the external event application. (required) * @param string $external_event_id The id of the marketing event in the external event application. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByExternalEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getParticipationsBreakdownByExternalEventIdAsync($external_account_id, $external_event_id, $after = null, $contact_identifier = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByExternalEventId'][0]) + public function getParticipationsBreakdownByExternalEventIdAsync($external_account_id, $external_event_id, $contact_identifier = null, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByExternalEventId'][0]) { - return $this->getParticipationsBreakdownByExternalEventIdAsyncWithHttpInfo($external_account_id, $external_event_id, $after, $contact_identifier, $limit, $state, $contentType) + return $this->getParticipationsBreakdownByExternalEventIdAsyncWithHttpInfo($external_account_id, $external_event_id, $contact_identifier, $state, $limit, $after, $contentType) ->then( function ($response) { return $response[0]; @@ -627,19 +627,19 @@ function ($response) { * * @param string $external_account_id The accountId that is associated with this marketing event in the external event application. (required) * @param string $external_event_id The id of the marketing event in the external event application. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByExternalEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getParticipationsBreakdownByExternalEventIdAsyncWithHttpInfo($external_account_id, $external_event_id, $after = null, $contact_identifier = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByExternalEventId'][0]) + public function getParticipationsBreakdownByExternalEventIdAsyncWithHttpInfo($external_account_id, $external_event_id, $contact_identifier = null, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByExternalEventId'][0]) { $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdown'; - $request = $this->getParticipationsBreakdownByExternalEventIdRequest($external_account_id, $external_event_id, $after, $contact_identifier, $limit, $state, $contentType); + $request = $this->getParticipationsBreakdownByExternalEventIdRequest($external_account_id, $external_event_id, $contact_identifier, $state, $limit, $after, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -682,16 +682,16 @@ function ($exception) { * * @param string $external_account_id The accountId that is associated with this marketing event in the external event application. (required) * @param string $external_event_id The id of the marketing event in the external event application. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByExternalEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getParticipationsBreakdownByExternalEventIdRequest($external_account_id, $external_event_id, $after = null, $contact_identifier = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByExternalEventId'][0]) + public function getParticipationsBreakdownByExternalEventIdRequest($external_account_id, $external_event_id, $contact_identifier = null, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByExternalEventId'][0]) { // verify the required parameter 'external_account_id' is set @@ -722,8 +722,8 @@ public function getParticipationsBreakdownByExternalEventIdRequest($external_acc // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $contact_identifier, + 'contactIdentifier', // param base name 'string', // openApiType 'form', // style true, // explode @@ -731,8 +731,8 @@ public function getParticipationsBreakdownByExternalEventIdRequest($external_acc ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $contact_identifier, - 'contactIdentifier', // param base name + $state, + 'state', // param base name 'string', // openApiType 'form', // style true, // explode @@ -749,8 +749,8 @@ public function getParticipationsBreakdownByExternalEventIdRequest($external_acc ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $state, - 'state', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode @@ -839,19 +839,19 @@ public function getParticipationsBreakdownByExternalEventIdRequest($external_acc * Read participations breakdown by Marketing Event internal identifier * * @param int $marketing_event_id The internal id of the marketing event in HubSpot. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByMarketingEventId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdown|\HubSpot\Client\Marketing\Events\Model\Error */ - public function getParticipationsBreakdownByMarketingEventId($marketing_event_id, $after = null, $contact_identifier = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByMarketingEventId'][0]) + public function getParticipationsBreakdownByMarketingEventId($marketing_event_id, $contact_identifier = null, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByMarketingEventId'][0]) { - list($response) = $this->getParticipationsBreakdownByMarketingEventIdWithHttpInfo($marketing_event_id, $after, $contact_identifier, $limit, $state, $contentType); + list($response) = $this->getParticipationsBreakdownByMarketingEventIdWithHttpInfo($marketing_event_id, $contact_identifier, $state, $limit, $after, $contentType); return $response; } @@ -861,19 +861,19 @@ public function getParticipationsBreakdownByMarketingEventId($marketing_event_id * Read participations breakdown by Marketing Event internal identifier * * @param int $marketing_event_id The internal id of the marketing event in HubSpot. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByMarketingEventId'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Events\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdown|\HubSpot\Client\Marketing\Events\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getParticipationsBreakdownByMarketingEventIdWithHttpInfo($marketing_event_id, $after = null, $contact_identifier = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByMarketingEventId'][0]) + public function getParticipationsBreakdownByMarketingEventIdWithHttpInfo($marketing_event_id, $contact_identifier = null, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByMarketingEventId'][0]) { - $request = $this->getParticipationsBreakdownByMarketingEventIdRequest($marketing_event_id, $after, $contact_identifier, $limit, $state, $contentType); + $request = $this->getParticipationsBreakdownByMarketingEventIdRequest($marketing_event_id, $contact_identifier, $state, $limit, $after, $contentType); try { $options = $this->createHttpClientOption(); @@ -964,18 +964,18 @@ public function getParticipationsBreakdownByMarketingEventIdWithHttpInfo($market * Read participations breakdown by Marketing Event internal identifier * * @param int $marketing_event_id The internal id of the marketing event in HubSpot. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByMarketingEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getParticipationsBreakdownByMarketingEventIdAsync($marketing_event_id, $after = null, $contact_identifier = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByMarketingEventId'][0]) + public function getParticipationsBreakdownByMarketingEventIdAsync($marketing_event_id, $contact_identifier = null, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByMarketingEventId'][0]) { - return $this->getParticipationsBreakdownByMarketingEventIdAsyncWithHttpInfo($marketing_event_id, $after, $contact_identifier, $limit, $state, $contentType) + return $this->getParticipationsBreakdownByMarketingEventIdAsyncWithHttpInfo($marketing_event_id, $contact_identifier, $state, $limit, $after, $contentType) ->then( function ($response) { return $response[0]; @@ -989,19 +989,19 @@ function ($response) { * Read participations breakdown by Marketing Event internal identifier * * @param int $marketing_event_id The internal id of the marketing event in HubSpot. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByMarketingEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getParticipationsBreakdownByMarketingEventIdAsyncWithHttpInfo($marketing_event_id, $after = null, $contact_identifier = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByMarketingEventId'][0]) + public function getParticipationsBreakdownByMarketingEventIdAsyncWithHttpInfo($marketing_event_id, $contact_identifier = null, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByMarketingEventId'][0]) { $returnType = '\HubSpot\Client\Marketing\Events\Model\CollectionResponseWithTotalParticipationBreakdown'; - $request = $this->getParticipationsBreakdownByMarketingEventIdRequest($marketing_event_id, $after, $contact_identifier, $limit, $state, $contentType); + $request = $this->getParticipationsBreakdownByMarketingEventIdRequest($marketing_event_id, $contact_identifier, $state, $limit, $after, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1043,16 +1043,16 @@ function ($exception) { * Create request for operation 'getParticipationsBreakdownByMarketingEventId' * * @param int $marketing_event_id The internal id of the marketing event in HubSpot. (required) - * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string|null $contact_identifier The identifier of the Contact. It may be email or internal id. (optional) - * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) * @param string|null $state The participation state value. It may be REGISTERED, CANCELLED, ATTENDED, NO_SHOW (optional) + * @param int|null $limit The limit for response size. The default value is 10, the max number is 100 (optional, default to 10) + * @param string|null $after The cursor indicating the position of the last retrieved item. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getParticipationsBreakdownByMarketingEventId'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getParticipationsBreakdownByMarketingEventIdRequest($marketing_event_id, $after = null, $contact_identifier = null, $limit = 10, $state = null, string $contentType = self::contentTypes['getParticipationsBreakdownByMarketingEventId'][0]) + public function getParticipationsBreakdownByMarketingEventIdRequest($marketing_event_id, $contact_identifier = null, $state = null, $limit = 10, $after = null, string $contentType = self::contentTypes['getParticipationsBreakdownByMarketingEventId'][0]) { // verify the required parameter 'marketing_event_id' is set @@ -1076,8 +1076,8 @@ public function getParticipationsBreakdownByMarketingEventIdRequest($marketing_e // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $contact_identifier, + 'contactIdentifier', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1085,8 +1085,8 @@ public function getParticipationsBreakdownByMarketingEventIdRequest($marketing_e ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $contact_identifier, - 'contactIdentifier', // param base name + $state, + 'state', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1103,8 +1103,8 @@ public function getParticipationsBreakdownByMarketingEventIdRequest($marketing_e ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $state, - 'state', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode diff --git a/codegen/Marketing/Forms/Api/BasicApi.php b/codegen/Marketing/Forms/Api/BasicApi.php index 61997c4e..e422da78 100644 --- a/codegen/Marketing/Forms/Api/BasicApi.php +++ b/codegen/Marketing/Forms/Api/BasicApi.php @@ -76,13 +76,13 @@ class BasicApi 'archive' => [ 'application/json', ], - 'getById' => [ + 'create' => [ 'application/json', ], - 'marketingV3Forms' => [ + 'getById' => [ 'application/json', ], - 'marketingV3Forms_0' => [ + 'getPage' => [ 'application/json', ], 'replace' => [ @@ -370,40 +370,34 @@ public function archiveRequest($form_id, string $contentType = self::contentType } /** - * Operation getById - * - * Get a form definition + * Operation create * - * @param string $form_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinitionCreateRequest $body body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Forms\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition|\HubSpot\Client\Marketing\Forms\Model\Error */ - public function getById($form_id, $archived = null, string $contentType = self::contentTypes['getById'][0]) + public function create($body, string $contentType = self::contentTypes['create'][0]) { - list($response) = $this->getByIdWithHttpInfo($form_id, $archived, $contentType); + list($response) = $this->createWithHttpInfo($body, $contentType); return $response; } /** - * Operation getByIdWithHttpInfo + * Operation createWithHttpInfo * - * Get a form definition - * - * @param string $form_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinitionCreateRequest $body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Forms\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition|\HubSpot\Client\Marketing\Forms\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByIdWithHttpInfo($form_id, $archived = null, string $contentType = self::contentTypes['getById'][0]) + public function createWithHttpInfo($body, string $contentType = self::contentTypes['create'][0]) { - $request = $this->getByIdRequest($form_id, $archived, $contentType); + $request = $this->createRequest($body, $contentType); try { $options = $this->createHttpClientOption(); @@ -429,7 +423,7 @@ public function getByIdWithHttpInfo($form_id, $archived = null, string $contentT switch($statusCode) { - case 200: + case 201: return $this->handleResponseWithDataType( '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition', $request, @@ -465,7 +459,7 @@ public function getByIdWithHttpInfo($form_id, $archived = null, string $contentT ); } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition', @@ -489,20 +483,17 @@ public function getByIdWithHttpInfo($form_id, $archived = null, string $contentT } /** - * Operation getByIdAsync - * - * Get a form definition + * Operation createAsync * - * @param string $form_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinitionCreateRequest $body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($form_id, $archived = null, string $contentType = self::contentTypes['getById'][0]) + public function createAsync($body, string $contentType = self::contentTypes['create'][0]) { - return $this->getByIdAsyncWithHttpInfo($form_id, $archived, $contentType) + return $this->createAsyncWithHttpInfo($body, $contentType) ->then( function ($response) { return $response[0]; @@ -511,21 +502,18 @@ function ($response) { } /** - * Operation getByIdAsyncWithHttpInfo - * - * Get a form definition + * Operation createAsyncWithHttpInfo * - * @param string $form_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinitionCreateRequest $body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($form_id, $archived = null, string $contentType = self::contentTypes['getById'][0]) + public function createAsyncWithHttpInfo($body, string $contentType = self::contentTypes['create'][0]) { $returnType = '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition'; - $request = $this->getByIdRequest($form_id, $archived, $contentType); + $request = $this->createRequest($body, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -564,53 +552,34 @@ function ($exception) { } /** - * Create request for operation 'getById' + * Create request for operation 'create' * - * @param string $form_id (required) - * @param bool|null $archived Whether to return only results that have been archived. (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation + * @param \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinitionCreateRequest $body (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($form_id, $archived = null, string $contentType = self::contentTypes['getById'][0]) + public function createRequest($body, string $contentType = self::contentTypes['create'][0]) { - // verify the required parameter 'form_id' is set - if ($form_id === null || (is_array($form_id) && count($form_id) === 0)) { + // verify the required parameter 'body' is set + if ($body === null || (is_array($body) && count($body) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $form_id when calling getById' + 'Missing the required parameter $body when calling create' ); } - - $resourcePath = '/marketing/v3/forms/{formId}'; + $resourcePath = '/marketing/v3/forms'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $archived, - 'archived', // param base name - 'boolean', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // path params - if ($form_id !== null) { - $resourcePath = str_replace( - '{' . 'formId' . '}', - ObjectSerializer::toPathValue($form_id), - $resourcePath - ); - } $headers = $this->headerSelector->selectHeaders( @@ -620,7 +589,14 @@ public function getByIdRequest($form_id, $archived = null, string $contentType = ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($body)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($body), JSON_THROW_ON_ERROR); + } else { + $httpBody = $body; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -663,7 +639,7 @@ public function getByIdRequest($form_id, $archived = null, string $contentType = $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -671,40 +647,40 @@ public function getByIdRequest($form_id, $archived = null, string $contentType = } /** - * Operation marketingV3Forms + * Operation getById * - * @param string|null $after after (optional) - * @param bool|null $archived archived (optional) - * @param string[]|null $form_types form_types (optional) - * @param int|null $limit limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Forms'] to see the possible values for this operation + * Get a form definition + * + * @param string $form_id (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Forms\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging|\HubSpot\Client\Marketing\Forms\Model\Error + * @return \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition|\HubSpot\Client\Marketing\Forms\Model\Error */ - public function marketingV3Forms($after = null, $archived = null, $form_types = null, $limit = null, string $contentType = self::contentTypes['marketingV3Forms'][0]) + public function getById($form_id, $archived = null, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->marketingV3FormsWithHttpInfo($after, $archived, $form_types, $limit, $contentType); + list($response) = $this->getByIdWithHttpInfo($form_id, $archived, $contentType); return $response; } /** - * Operation marketingV3FormsWithHttpInfo + * Operation getByIdWithHttpInfo * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param string[]|null $form_types (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Forms'] to see the possible values for this operation + * Get a form definition + * + * @param string $form_id (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Forms\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging|\HubSpot\Client\Marketing\Forms\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition|\HubSpot\Client\Marketing\Forms\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function marketingV3FormsWithHttpInfo($after = null, $archived = null, $form_types = null, $limit = null, string $contentType = self::contentTypes['marketingV3Forms'][0]) + public function getByIdWithHttpInfo($form_id, $archived = null, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->marketingV3FormsRequest($after, $archived, $form_types, $limit, $contentType); + $request = $this->getByIdRequest($form_id, $archived, $contentType); try { $options = $this->createHttpClientOption(); @@ -732,7 +708,7 @@ public function marketingV3FormsWithHttpInfo($after = null, $archived = null, $f switch($statusCode) { case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging', + '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition', $request, $response, ); @@ -760,7 +736,7 @@ public function marketingV3FormsWithHttpInfo($after = null, $archived = null, $f } return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging', + '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition', $request, $response, ); @@ -769,7 +745,7 @@ public function marketingV3FormsWithHttpInfo($after = null, $archived = null, $f case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging', + '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -790,20 +766,20 @@ public function marketingV3FormsWithHttpInfo($after = null, $archived = null, $f } /** - * Operation marketingV3FormsAsync + * Operation getByIdAsync * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param string[]|null $form_types (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Forms'] to see the possible values for this operation + * Get a form definition + * + * @param string $form_id (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function marketingV3FormsAsync($after = null, $archived = null, $form_types = null, $limit = null, string $contentType = self::contentTypes['marketingV3Forms'][0]) + public function getByIdAsync($form_id, $archived = null, string $contentType = self::contentTypes['getById'][0]) { - return $this->marketingV3FormsAsyncWithHttpInfo($after, $archived, $form_types, $limit, $contentType) + return $this->getByIdAsyncWithHttpInfo($form_id, $archived, $contentType) ->then( function ($response) { return $response[0]; @@ -812,21 +788,21 @@ function ($response) { } /** - * Operation marketingV3FormsAsyncWithHttpInfo + * Operation getByIdAsyncWithHttpInfo * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param string[]|null $form_types (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Forms'] to see the possible values for this operation + * Get a form definition + * + * @param string $form_id (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function marketingV3FormsAsyncWithHttpInfo($after = null, $archived = null, $form_types = null, $limit = null, string $contentType = self::contentTypes['marketingV3Forms'][0]) + public function getByIdAsyncWithHttpInfo($form_id, $archived = null, string $contentType = self::contentTypes['getById'][0]) { - $returnType = '\HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging'; - $request = $this->marketingV3FormsRequest($after, $archived, $form_types, $limit, $contentType); + $returnType = '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition'; + $request = $this->getByIdRequest($form_id, $archived, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -865,41 +841,34 @@ function ($exception) { } /** - * Create request for operation 'marketingV3Forms' + * Create request for operation 'getById' * - * @param string|null $after (optional) - * @param bool|null $archived (optional) - * @param string[]|null $form_types (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Forms'] to see the possible values for this operation + * @param string $form_id (required) + * @param bool|null $archived Whether to return only results that have been archived. (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function marketingV3FormsRequest($after = null, $archived = null, $form_types = null, $limit = null, string $contentType = self::contentTypes['marketingV3Forms'][0]) + public function getByIdRequest($form_id, $archived = null, string $contentType = self::contentTypes['getById'][0]) { + // verify the required parameter 'form_id' is set + if ($form_id === null || (is_array($form_id) && count($form_id) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $form_id when calling getById' + ); + } - - - $resourcePath = '/marketing/v3/forms'; + $resourcePath = '/marketing/v3/forms/{formId}'; $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( $archived, @@ -909,26 +878,16 @@ public function marketingV3FormsRequest($after = null, $archived = null, $form_t true, // explode false // required ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $form_types, - 'formTypes', // param base name - 'array', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); + // path params + if ($form_id !== null) { + $resourcePath = str_replace( + '{' . 'formId' . '}', + ObjectSerializer::toPathValue($form_id), + $resourcePath + ); + } $headers = $this->headerSelector->selectHeaders( @@ -989,34 +948,40 @@ public function marketingV3FormsRequest($after = null, $archived = null, $form_t } /** - * Operation marketingV3Forms_0 + * Operation getPage * - * @param \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinitionCreateRequest $body body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Forms_0'] to see the possible values for this operation + * @param string|null $after after (optional) + * @param int|null $limit limit (optional) + * @param bool|null $archived archived (optional) + * @param string[]|null $form_types form_types (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Forms\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition|\HubSpot\Client\Marketing\Forms\Model\Error + * @return \HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging|\HubSpot\Client\Marketing\Forms\Model\Error */ - public function marketingV3Forms_0($body, string $contentType = self::contentTypes['marketingV3Forms_0'][0]) + public function getPage($after = null, $limit = null, $archived = null, $form_types = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->marketingV3Forms_0WithHttpInfo($body, $contentType); + list($response) = $this->getPageWithHttpInfo($after, $limit, $archived, $form_types, $contentType); return $response; } /** - * Operation marketingV3Forms_0WithHttpInfo + * Operation getPageWithHttpInfo * - * @param \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinitionCreateRequest $body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Forms_0'] to see the possible values for this operation + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string[]|null $form_types (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Marketing\Forms\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition|\HubSpot\Client\Marketing\Forms\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging|\HubSpot\Client\Marketing\Forms\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function marketingV3Forms_0WithHttpInfo($body, string $contentType = self::contentTypes['marketingV3Forms_0'][0]) + public function getPageWithHttpInfo($after = null, $limit = null, $archived = null, $form_types = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->marketingV3Forms_0Request($body, $contentType); + $request = $this->getPageRequest($after, $limit, $archived, $form_types, $contentType); try { $options = $this->createHttpClientOption(); @@ -1042,9 +1007,9 @@ public function marketingV3Forms_0WithHttpInfo($body, string $contentType = self switch($statusCode) { - case 201: + case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition', + '\HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging', $request, $response, ); @@ -1072,16 +1037,16 @@ public function marketingV3Forms_0WithHttpInfo($body, string $contentType = self } return $this->handleResponseWithDataType( - '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition', + '\HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition', + '\HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -1102,17 +1067,20 @@ public function marketingV3Forms_0WithHttpInfo($body, string $contentType = self } /** - * Operation marketingV3Forms_0Async + * Operation getPageAsync * - * @param \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinitionCreateRequest $body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Forms_0'] to see the possible values for this operation + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string[]|null $form_types (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function marketingV3Forms_0Async($body, string $contentType = self::contentTypes['marketingV3Forms_0'][0]) + public function getPageAsync($after = null, $limit = null, $archived = null, $form_types = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->marketingV3Forms_0AsyncWithHttpInfo($body, $contentType) + return $this->getPageAsyncWithHttpInfo($after, $limit, $archived, $form_types, $contentType) ->then( function ($response) { return $response[0]; @@ -1121,18 +1089,21 @@ function ($response) { } /** - * Operation marketingV3Forms_0AsyncWithHttpInfo + * Operation getPageAsyncWithHttpInfo * - * @param \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinitionCreateRequest $body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Forms_0'] to see the possible values for this operation + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string[]|null $form_types (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function marketingV3Forms_0AsyncWithHttpInfo($body, string $contentType = self::contentTypes['marketingV3Forms_0'][0]) + public function getPageAsyncWithHttpInfo($after = null, $limit = null, $archived = null, $form_types = null, string $contentType = self::contentTypes['getPage'][0]) { - $returnType = '\HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinition'; - $request = $this->marketingV3Forms_0Request($body, $contentType); + $returnType = '\HubSpot\Client\Marketing\Forms\Model\CollectionResponseFormDefinitionBaseForwardPaging'; + $request = $this->getPageRequest($after, $limit, $archived, $form_types, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1171,23 +1142,23 @@ function ($exception) { } /** - * Create request for operation 'marketingV3Forms_0' + * Create request for operation 'getPage' * - * @param \HubSpot\Client\Marketing\Forms\Model\HubSpotFormDefinitionCreateRequest $body (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['marketingV3Forms_0'] to see the possible values for this operation + * @param string|null $after (optional) + * @param int|null $limit (optional) + * @param bool|null $archived (optional) + * @param string[]|null $form_types (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function marketingV3Forms_0Request($body, string $contentType = self::contentTypes['marketingV3Forms_0'][0]) + public function getPageRequest($after = null, $limit = null, $archived = null, $form_types = null, string $contentType = self::contentTypes['getPage'][0]) { - // verify the required parameter 'body' is set - if ($body === null || (is_array($body) && count($body) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $body when calling marketingV3Forms_0' - ); - } + + + $resourcePath = '/marketing/v3/forms'; @@ -1197,6 +1168,42 @@ public function marketingV3Forms_0Request($body, string $contentType = self::con $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $archived, + 'archived', // param base name + 'boolean', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $form_types, + 'formTypes', // param base name + 'array', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); @@ -1208,14 +1215,7 @@ public function marketingV3Forms_0Request($body, string $contentType = self::con ); // for model (json/xml) - if (isset($body)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($body), JSON_THROW_ON_ERROR); - } else { - $httpBody = $body; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -1258,7 +1258,7 @@ public function marketingV3Forms_0Request($body, string $contentType = self::con $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/codegen/Marketing/Transactional/Api/SMTPTokensApi.php b/codegen/Marketing/Transactional/Api/SMTPTokensApi.php index 5fa8298c..5a55e610 100644 --- a/codegen/Marketing/Transactional/Api/SMTPTokensApi.php +++ b/codegen/Marketing/Transactional/Api/SMTPTokensApi.php @@ -942,9 +942,9 @@ public function getTokenByIdRequest($token_id, string $contentType = self::conte * * Query SMTP API tokens by campaign name or an emailCampaignId. * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string|null $campaign_name A name for the campaign tied to the SMTP API token. (optional) * @param string|null $email_campaign_id Identifier assigned to the campaign provided during the token creation. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTokensPage'] to see the possible values for this operation * @@ -952,9 +952,9 @@ public function getTokenByIdRequest($token_id, string $contentType = self::conte * @throws \InvalidArgumentException * @return \HubSpot\Client\Marketing\Transactional\Model\CollectionResponseSmtpApiTokenViewForwardPaging|\HubSpot\Client\Marketing\Transactional\Model\Error */ - public function getTokensPage($after = null, $campaign_name = null, $email_campaign_id = null, $limit = null, string $contentType = self::contentTypes['getTokensPage'][0]) + public function getTokensPage($campaign_name = null, $email_campaign_id = null, $after = null, $limit = null, string $contentType = self::contentTypes['getTokensPage'][0]) { - list($response) = $this->getTokensPageWithHttpInfo($after, $campaign_name, $email_campaign_id, $limit, $contentType); + list($response) = $this->getTokensPageWithHttpInfo($campaign_name, $email_campaign_id, $after, $limit, $contentType); return $response; } @@ -963,9 +963,9 @@ public function getTokensPage($after = null, $campaign_name = null, $email_campa * * Query SMTP API tokens by campaign name or an emailCampaignId. * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string|null $campaign_name A name for the campaign tied to the SMTP API token. (optional) * @param string|null $email_campaign_id Identifier assigned to the campaign provided during the token creation. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTokensPage'] to see the possible values for this operation * @@ -973,9 +973,9 @@ public function getTokensPage($after = null, $campaign_name = null, $email_campa * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Marketing\Transactional\Model\CollectionResponseSmtpApiTokenViewForwardPaging|\HubSpot\Client\Marketing\Transactional\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getTokensPageWithHttpInfo($after = null, $campaign_name = null, $email_campaign_id = null, $limit = null, string $contentType = self::contentTypes['getTokensPage'][0]) + public function getTokensPageWithHttpInfo($campaign_name = null, $email_campaign_id = null, $after = null, $limit = null, string $contentType = self::contentTypes['getTokensPage'][0]) { - $request = $this->getTokensPageRequest($after, $campaign_name, $email_campaign_id, $limit, $contentType); + $request = $this->getTokensPageRequest($campaign_name, $email_campaign_id, $after, $limit, $contentType); try { $options = $this->createHttpClientOption(); @@ -1065,18 +1065,18 @@ public function getTokensPageWithHttpInfo($after = null, $campaign_name = null, * * Query SMTP API tokens by campaign name or an emailCampaignId. * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string|null $campaign_name A name for the campaign tied to the SMTP API token. (optional) * @param string|null $email_campaign_id Identifier assigned to the campaign provided during the token creation. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTokensPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTokensPageAsync($after = null, $campaign_name = null, $email_campaign_id = null, $limit = null, string $contentType = self::contentTypes['getTokensPage'][0]) + public function getTokensPageAsync($campaign_name = null, $email_campaign_id = null, $after = null, $limit = null, string $contentType = self::contentTypes['getTokensPage'][0]) { - return $this->getTokensPageAsyncWithHttpInfo($after, $campaign_name, $email_campaign_id, $limit, $contentType) + return $this->getTokensPageAsyncWithHttpInfo($campaign_name, $email_campaign_id, $after, $limit, $contentType) ->then( function ($response) { return $response[0]; @@ -1089,19 +1089,19 @@ function ($response) { * * Query SMTP API tokens by campaign name or an emailCampaignId. * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string|null $campaign_name A name for the campaign tied to the SMTP API token. (optional) * @param string|null $email_campaign_id Identifier assigned to the campaign provided during the token creation. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTokensPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getTokensPageAsyncWithHttpInfo($after = null, $campaign_name = null, $email_campaign_id = null, $limit = null, string $contentType = self::contentTypes['getTokensPage'][0]) + public function getTokensPageAsyncWithHttpInfo($campaign_name = null, $email_campaign_id = null, $after = null, $limit = null, string $contentType = self::contentTypes['getTokensPage'][0]) { $returnType = '\HubSpot\Client\Marketing\Transactional\Model\CollectionResponseSmtpApiTokenViewForwardPaging'; - $request = $this->getTokensPageRequest($after, $campaign_name, $email_campaign_id, $limit, $contentType); + $request = $this->getTokensPageRequest($campaign_name, $email_campaign_id, $after, $limit, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1142,16 +1142,16 @@ function ($exception) { /** * Create request for operation 'getTokensPage' * - * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param string|null $campaign_name A name for the campaign tied to the SMTP API token. (optional) * @param string|null $email_campaign_id Identifier assigned to the campaign provided during the token creation. (optional) + * @param string|null $after The paging cursor token of the last successfully read resource will be returned as the `paging.next.after` JSON property of a paged response containing more results. (optional) * @param int|null $limit The maximum number of results to display per page. (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getTokensPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getTokensPageRequest($after = null, $campaign_name = null, $email_campaign_id = null, $limit = null, string $contentType = self::contentTypes['getTokensPage'][0]) + public function getTokensPageRequest($campaign_name = null, $email_campaign_id = null, $after = null, $limit = null, string $contentType = self::contentTypes['getTokensPage'][0]) { @@ -1168,8 +1168,8 @@ public function getTokensPageRequest($after = null, $campaign_name = null, $emai // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name + $campaign_name, + 'campaignName', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1177,8 +1177,8 @@ public function getTokensPageRequest($after = null, $campaign_name = null, $emai ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $campaign_name, - 'campaignName', // param base name + $email_campaign_id, + 'emailCampaignId', // param base name 'string', // openApiType 'form', // style true, // explode @@ -1186,8 +1186,8 @@ public function getTokensPageRequest($after = null, $campaign_name = null, $emai ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $email_campaign_id, - 'emailCampaignId', // param base name + $after, + 'after', // param base name 'string', // openApiType 'form', // style true, // explode diff --git a/codegen/Settings/BusinessUnits/Api/BasicApi.php b/codegen/Settings/BusinessUnits/Api/BasicApi.php index ac78ab2a..5e2d5442 100644 --- a/codegen/Settings/BusinessUnits/Api/BasicApi.php +++ b/codegen/Settings/BusinessUnits/Api/BasicApi.php @@ -130,17 +130,17 @@ public function getConfig() * Retrieve brands by associated user * * @param string $user_id (required) - * @param string[]|null $name (optional) * @param string[]|null $properties (optional) + * @param string[]|null $name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByUserID'] to see the possible values for this operation * * @throws \HubSpot\Client\Settings\BusinessUnits\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Settings\BusinessUnits\Model\CollectionResponsePublicBusinessUnitNoPaging|\HubSpot\Client\Settings\BusinessUnits\Model\Error */ - public function getByUserID($user_id, $name = null, $properties = null, string $contentType = self::contentTypes['getByUserID'][0]) + public function getByUserID($user_id, $properties = null, $name = null, string $contentType = self::contentTypes['getByUserID'][0]) { - list($response) = $this->getByUserIDWithHttpInfo($user_id, $name, $properties, $contentType); + list($response) = $this->getByUserIDWithHttpInfo($user_id, $properties, $name, $contentType); return $response; } @@ -150,17 +150,17 @@ public function getByUserID($user_id, $name = null, $properties = null, string $ * Retrieve brands by associated user * * @param string $user_id (required) - * @param string[]|null $name (optional) * @param string[]|null $properties (optional) + * @param string[]|null $name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByUserID'] to see the possible values for this operation * * @throws \HubSpot\Client\Settings\BusinessUnits\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of \HubSpot\Client\Settings\BusinessUnits\Model\CollectionResponsePublicBusinessUnitNoPaging|\HubSpot\Client\Settings\BusinessUnits\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function getByUserIDWithHttpInfo($user_id, $name = null, $properties = null, string $contentType = self::contentTypes['getByUserID'][0]) + public function getByUserIDWithHttpInfo($user_id, $properties = null, $name = null, string $contentType = self::contentTypes['getByUserID'][0]) { - $request = $this->getByUserIDRequest($user_id, $name, $properties, $contentType); + $request = $this->getByUserIDRequest($user_id, $properties, $name, $contentType); try { $options = $this->createHttpClientOption(); @@ -251,16 +251,16 @@ public function getByUserIDWithHttpInfo($user_id, $name = null, $properties = nu * Retrieve brands by associated user * * @param string $user_id (required) - * @param string[]|null $name (optional) * @param string[]|null $properties (optional) + * @param string[]|null $name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByUserID'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByUserIDAsync($user_id, $name = null, $properties = null, string $contentType = self::contentTypes['getByUserID'][0]) + public function getByUserIDAsync($user_id, $properties = null, $name = null, string $contentType = self::contentTypes['getByUserID'][0]) { - return $this->getByUserIDAsyncWithHttpInfo($user_id, $name, $properties, $contentType) + return $this->getByUserIDAsyncWithHttpInfo($user_id, $properties, $name, $contentType) ->then( function ($response) { return $response[0]; @@ -274,17 +274,17 @@ function ($response) { * Retrieve brands by associated user * * @param string $user_id (required) - * @param string[]|null $name (optional) * @param string[]|null $properties (optional) + * @param string[]|null $name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByUserID'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByUserIDAsyncWithHttpInfo($user_id, $name = null, $properties = null, string $contentType = self::contentTypes['getByUserID'][0]) + public function getByUserIDAsyncWithHttpInfo($user_id, $properties = null, $name = null, string $contentType = self::contentTypes['getByUserID'][0]) { $returnType = '\HubSpot\Client\Settings\BusinessUnits\Model\CollectionResponsePublicBusinessUnitNoPaging'; - $request = $this->getByUserIDRequest($user_id, $name, $properties, $contentType); + $request = $this->getByUserIDRequest($user_id, $properties, $name, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -326,14 +326,14 @@ function ($exception) { * Create request for operation 'getByUserID' * * @param string $user_id (required) - * @param string[]|null $name (optional) * @param string[]|null $properties (optional) + * @param string[]|null $name (optional) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getByUserID'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByUserIDRequest($user_id, $name = null, $properties = null, string $contentType = self::contentTypes['getByUserID'][0]) + public function getByUserIDRequest($user_id, $properties = null, $name = null, string $contentType = self::contentTypes['getByUserID'][0]) { // verify the required parameter 'user_id' is set @@ -355,8 +355,8 @@ public function getByUserIDRequest($user_id, $name = null, $properties = null, s // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $name, - 'name', // param base name + $properties, + 'properties', // param base name 'array', // openApiType 'form', // style true, // explode @@ -364,8 +364,8 @@ public function getByUserIDRequest($user_id, $name = null, $properties = null, s ) ?? []); // query params $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $properties, - 'properties', // param base name + $name, + 'name', // param base name 'array', // openApiType 'form', // style true, // explode diff --git a/codegen/Settings/Users/Api/BasicApi.php b/codegen/Settings/Users/Api/BasicApi.php index e8589053..dea6dfa7 100644 --- a/codegen/Settings/Users/Api/BasicApi.php +++ b/codegen/Settings/Users/Api/BasicApi.php @@ -73,10 +73,10 @@ class BasicApi /** @var string[] $contentTypes **/ public const contentTypes = [ - 'settingsUsersV3' => [ + 'create' => [ 'application/json', ], - 'settingsUsersV3_0' => [ + 'getPage' => [ 'application/json', ], ]; @@ -128,36 +128,34 @@ public function getConfig() } /** - * Operation settingsUsersV3 + * Operation create * - * @param string|null $after after (optional) - * @param int|null $limit limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['settingsUsersV3'] to see the possible values for this operation + * @param \HubSpot\Client\Settings\Users\Model\UserProvisionRequest $user_provision_request user_provision_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Settings\Users\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging|\HubSpot\Client\Settings\Users\Model\Error + * @return \HubSpot\Client\Settings\Users\Model\PublicUser|\HubSpot\Client\Settings\Users\Model\Error */ - public function settingsUsersV3($after = null, $limit = null, string $contentType = self::contentTypes['settingsUsersV3'][0]) + public function create($user_provision_request, string $contentType = self::contentTypes['create'][0]) { - list($response) = $this->settingsUsersV3WithHttpInfo($after, $limit, $contentType); + list($response) = $this->createWithHttpInfo($user_provision_request, $contentType); return $response; } /** - * Operation settingsUsersV3WithHttpInfo + * Operation createWithHttpInfo * - * @param string|null $after (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['settingsUsersV3'] to see the possible values for this operation + * @param \HubSpot\Client\Settings\Users\Model\UserProvisionRequest $user_provision_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \HubSpot\Client\Settings\Users\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging|\HubSpot\Client\Settings\Users\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Settings\Users\Model\PublicUser|\HubSpot\Client\Settings\Users\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function settingsUsersV3WithHttpInfo($after = null, $limit = null, string $contentType = self::contentTypes['settingsUsersV3'][0]) + public function createWithHttpInfo($user_provision_request, string $contentType = self::contentTypes['create'][0]) { - $request = $this->settingsUsersV3Request($after, $limit, $contentType); + $request = $this->createRequest($user_provision_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -183,9 +181,9 @@ public function settingsUsersV3WithHttpInfo($after = null, $limit = null, string switch($statusCode) { - case 200: + case 201: return $this->handleResponseWithDataType( - '\HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging', + '\HubSpot\Client\Settings\Users\Model\PublicUser', $request, $response, ); @@ -213,16 +211,16 @@ public function settingsUsersV3WithHttpInfo($after = null, $limit = null, string } return $this->handleResponseWithDataType( - '\HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging', + '\HubSpot\Client\Settings\Users\Model\PublicUser', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { - case 200: + case 201: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging', + '\HubSpot\Client\Settings\Users\Model\PublicUser', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -243,18 +241,17 @@ public function settingsUsersV3WithHttpInfo($after = null, $limit = null, string } /** - * Operation settingsUsersV3Async + * Operation createAsync * - * @param string|null $after (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['settingsUsersV3'] to see the possible values for this operation + * @param \HubSpot\Client\Settings\Users\Model\UserProvisionRequest $user_provision_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function settingsUsersV3Async($after = null, $limit = null, string $contentType = self::contentTypes['settingsUsersV3'][0]) + public function createAsync($user_provision_request, string $contentType = self::contentTypes['create'][0]) { - return $this->settingsUsersV3AsyncWithHttpInfo($after, $limit, $contentType) + return $this->createAsyncWithHttpInfo($user_provision_request, $contentType) ->then( function ($response) { return $response[0]; @@ -263,19 +260,18 @@ function ($response) { } /** - * Operation settingsUsersV3AsyncWithHttpInfo + * Operation createAsyncWithHttpInfo * - * @param string|null $after (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['settingsUsersV3'] to see the possible values for this operation + * @param \HubSpot\Client\Settings\Users\Model\UserProvisionRequest $user_provision_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function settingsUsersV3AsyncWithHttpInfo($after = null, $limit = null, string $contentType = self::contentTypes['settingsUsersV3'][0]) + public function createAsyncWithHttpInfo($user_provision_request, string $contentType = self::contentTypes['create'][0]) { - $returnType = '\HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging'; - $request = $this->settingsUsersV3Request($after, $limit, $contentType); + $returnType = '\HubSpot\Client\Settings\Users\Model\PublicUser'; + $request = $this->createRequest($user_provision_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -314,19 +310,23 @@ function ($exception) { } /** - * Create request for operation 'settingsUsersV3' + * Create request for operation 'create' * - * @param string|null $after (optional) - * @param int|null $limit (optional) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['settingsUsersV3'] to see the possible values for this operation + * @param \HubSpot\Client\Settings\Users\Model\UserProvisionRequest $user_provision_request (required) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['create'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function settingsUsersV3Request($after = null, $limit = null, string $contentType = self::contentTypes['settingsUsersV3'][0]) + public function createRequest($user_provision_request, string $contentType = self::contentTypes['create'][0]) { - + // verify the required parameter 'user_provision_request' is set + if ($user_provision_request === null || (is_array($user_provision_request) && count($user_provision_request) === 0)) { + throw new \InvalidArgumentException( + 'Missing the required parameter $user_provision_request when calling create' + ); + } $resourcePath = '/settings/users/v3'; @@ -336,24 +336,6 @@ public function settingsUsersV3Request($after = null, $limit = null, string $con $httpBody = ''; $multipart = false; - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $after, - 'after', // param base name - 'string', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); - // query params - $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( - $limit, - 'limit', // param base name - 'integer', // openApiType - 'form', // style - true, // explode - false // required - ) ?? []); @@ -365,7 +347,14 @@ public function settingsUsersV3Request($after = null, $limit = null, string $con ); // for model (json/xml) - if (count($formParams) > 0) { + if (isset($user_provision_request)) { + if (stripos($headers['Content-Type'], 'application/json') !== false) { + # if Content-Type contains "application/json", json_encode the body + $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($user_provision_request), JSON_THROW_ON_ERROR); + } else { + $httpBody = $user_provision_request; + } + } elseif (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -408,7 +397,7 @@ public function settingsUsersV3Request($after = null, $limit = null, string $con $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'GET', + 'POST', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody @@ -416,34 +405,36 @@ public function settingsUsersV3Request($after = null, $limit = null, string $con } /** - * Operation settingsUsersV3_0 + * Operation getPage * - * @param \HubSpot\Client\Settings\Users\Model\UserProvisionRequest $user_provision_request user_provision_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['settingsUsersV3_0'] to see the possible values for this operation + * @param int|null $limit limit (optional) + * @param string|null $after after (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Settings\Users\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return \HubSpot\Client\Settings\Users\Model\PublicUser|\HubSpot\Client\Settings\Users\Model\Error + * @return \HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging|\HubSpot\Client\Settings\Users\Model\Error */ - public function settingsUsersV3_0($user_provision_request, string $contentType = self::contentTypes['settingsUsersV3_0'][0]) + public function getPage($limit = null, $after = null, string $contentType = self::contentTypes['getPage'][0]) { - list($response) = $this->settingsUsersV3_0WithHttpInfo($user_provision_request, $contentType); + list($response) = $this->getPageWithHttpInfo($limit, $after, $contentType); return $response; } /** - * Operation settingsUsersV3_0WithHttpInfo + * Operation getPageWithHttpInfo * - * @param \HubSpot\Client\Settings\Users\Model\UserProvisionRequest $user_provision_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['settingsUsersV3_0'] to see the possible values for this operation + * @param int|null $limit (optional) + * @param string|null $after (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \HubSpot\Client\Settings\Users\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException - * @return array of \HubSpot\Client\Settings\Users\Model\PublicUser|\HubSpot\Client\Settings\Users\Model\Error, HTTP status code, HTTP response headers (array of strings) + * @return array of \HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging|\HubSpot\Client\Settings\Users\Model\Error, HTTP status code, HTTP response headers (array of strings) */ - public function settingsUsersV3_0WithHttpInfo($user_provision_request, string $contentType = self::contentTypes['settingsUsersV3_0'][0]) + public function getPageWithHttpInfo($limit = null, $after = null, string $contentType = self::contentTypes['getPage'][0]) { - $request = $this->settingsUsersV3_0Request($user_provision_request, $contentType); + $request = $this->getPageRequest($limit, $after, $contentType); try { $options = $this->createHttpClientOption(); @@ -469,9 +460,9 @@ public function settingsUsersV3_0WithHttpInfo($user_provision_request, string $c switch($statusCode) { - case 201: + case 200: return $this->handleResponseWithDataType( - '\HubSpot\Client\Settings\Users\Model\PublicUser', + '\HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging', $request, $response, ); @@ -499,16 +490,16 @@ public function settingsUsersV3_0WithHttpInfo($user_provision_request, string $c } return $this->handleResponseWithDataType( - '\HubSpot\Client\Settings\Users\Model\PublicUser', + '\HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging', $request, $response, ); } catch (ApiException $e) { switch ($e->getCode()) { - case 201: + case 200: $data = ObjectSerializer::deserialize( $e->getResponseBody(), - '\HubSpot\Client\Settings\Users\Model\PublicUser', + '\HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging', $e->getResponseHeaders() ); $e->setResponseObject($data); @@ -529,17 +520,18 @@ public function settingsUsersV3_0WithHttpInfo($user_provision_request, string $c } /** - * Operation settingsUsersV3_0Async + * Operation getPageAsync * - * @param \HubSpot\Client\Settings\Users\Model\UserProvisionRequest $user_provision_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['settingsUsersV3_0'] to see the possible values for this operation + * @param int|null $limit (optional) + * @param string|null $after (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function settingsUsersV3_0Async($user_provision_request, string $contentType = self::contentTypes['settingsUsersV3_0'][0]) + public function getPageAsync($limit = null, $after = null, string $contentType = self::contentTypes['getPage'][0]) { - return $this->settingsUsersV3_0AsyncWithHttpInfo($user_provision_request, $contentType) + return $this->getPageAsyncWithHttpInfo($limit, $after, $contentType) ->then( function ($response) { return $response[0]; @@ -548,18 +540,19 @@ function ($response) { } /** - * Operation settingsUsersV3_0AsyncWithHttpInfo + * Operation getPageAsyncWithHttpInfo * - * @param \HubSpot\Client\Settings\Users\Model\UserProvisionRequest $user_provision_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['settingsUsersV3_0'] to see the possible values for this operation + * @param int|null $limit (optional) + * @param string|null $after (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function settingsUsersV3_0AsyncWithHttpInfo($user_provision_request, string $contentType = self::contentTypes['settingsUsersV3_0'][0]) + public function getPageAsyncWithHttpInfo($limit = null, $after = null, string $contentType = self::contentTypes['getPage'][0]) { - $returnType = '\HubSpot\Client\Settings\Users\Model\PublicUser'; - $request = $this->settingsUsersV3_0Request($user_provision_request, $contentType); + $returnType = '\HubSpot\Client\Settings\Users\Model\CollectionResponsePublicUserForwardPaging'; + $request = $this->getPageRequest($limit, $after, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -598,23 +591,19 @@ function ($exception) { } /** - * Create request for operation 'settingsUsersV3_0' + * Create request for operation 'getPage' * - * @param \HubSpot\Client\Settings\Users\Model\UserProvisionRequest $user_provision_request (required) - * @param string $contentType The value for the Content-Type header. Check self::contentTypes['settingsUsersV3_0'] to see the possible values for this operation + * @param int|null $limit (optional) + * @param string|null $after (optional) + * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getPage'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function settingsUsersV3_0Request($user_provision_request, string $contentType = self::contentTypes['settingsUsersV3_0'][0]) + public function getPageRequest($limit = null, $after = null, string $contentType = self::contentTypes['getPage'][0]) { - // verify the required parameter 'user_provision_request' is set - if ($user_provision_request === null || (is_array($user_provision_request) && count($user_provision_request) === 0)) { - throw new \InvalidArgumentException( - 'Missing the required parameter $user_provision_request when calling settingsUsersV3_0' - ); - } + $resourcePath = '/settings/users/v3'; @@ -624,6 +613,24 @@ public function settingsUsersV3_0Request($user_provision_request, string $conten $httpBody = ''; $multipart = false; + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $limit, + 'limit', // param base name + 'integer', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); + // query params + $queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue( + $after, + 'after', // param base name + 'string', // openApiType + 'form', // style + true, // explode + false // required + ) ?? []); @@ -635,14 +642,7 @@ public function settingsUsersV3_0Request($user_provision_request, string $conten ); // for model (json/xml) - if (isset($user_provision_request)) { - if (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the body - $httpBody = json_encode(ObjectSerializer::sanitizeForSerialization($user_provision_request), JSON_THROW_ON_ERROR); - } else { - $httpBody = $user_provision_request; - } - } elseif (count($formParams) > 0) { + if (count($formParams) > 0) { if ($multipart) { $multipartContents = []; foreach ($formParams as $formParamName => $formParamValue) { @@ -685,7 +685,7 @@ public function settingsUsersV3_0Request($user_provision_request, string $conten $operationHost = $this->config->getHost(); $query = ObjectSerializer::buildQuery($queryParams); return new Request( - 'POST', + 'GET', $operationHost . $resourcePath . ($query ? "?{$query}" : ''), $headers, $httpBody diff --git a/codegen/Webhooks/Api/BasicApi.php b/codegen/Webhooks/Api/BasicApi.php index 9fde87fb..32674b97 100644 --- a/codegen/Webhooks/Api/BasicApi.php +++ b/codegen/Webhooks/Api/BasicApi.php @@ -150,17 +150,17 @@ public function getConfig() * * Delete event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the subscription to delete. (required) + * @param int $app_id The ID of the target app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return void */ - public function archive($app_id, $subscription_id, string $contentType = self::contentTypes['archive'][0]) + public function archive($subscription_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - $this->archiveWithHttpInfo($app_id, $subscription_id, $contentType); + $this->archiveWithHttpInfo($subscription_id, $app_id, $contentType); } /** @@ -168,17 +168,17 @@ public function archive($app_id, $subscription_id, string $contentType = self::c * * Delete event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the subscription to delete. (required) + * @param int $app_id The ID of the target app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return array of null, HTTP status code, HTTP response headers (array of strings) */ - public function archiveWithHttpInfo($app_id, $subscription_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveWithHttpInfo($subscription_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - $request = $this->archiveRequest($app_id, $subscription_id, $contentType); + $request = $this->archiveRequest($subscription_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -226,16 +226,16 @@ public function archiveWithHttpInfo($app_id, $subscription_id, string $contentTy * * Delete event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the subscription to delete. (required) + * @param int $app_id The ID of the target app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsync($app_id, $subscription_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsync($subscription_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - return $this->archiveAsyncWithHttpInfo($app_id, $subscription_id, $contentType) + return $this->archiveAsyncWithHttpInfo($subscription_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -248,17 +248,17 @@ function ($response) { * * Delete event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the subscription to delete. (required) + * @param int $app_id The ID of the target app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function archiveAsyncWithHttpInfo($app_id, $subscription_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveAsyncWithHttpInfo($subscription_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { $returnType = ''; - $request = $this->archiveRequest($app_id, $subscription_id, $contentType); + $request = $this->archiveRequest($subscription_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -286,27 +286,27 @@ function ($exception) { /** * Create request for operation 'archive' * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the subscription to delete. (required) + * @param int $app_id The ID of the target app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['archive'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function archiveRequest($app_id, $subscription_id, string $contentType = self::contentTypes['archive'][0]) + public function archiveRequest($subscription_id, $app_id, string $contentType = self::contentTypes['archive'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'subscription_id' is set + if ($subscription_id === null || (is_array($subscription_id) && count($subscription_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling archive' + 'Missing the required parameter $subscription_id when calling archive' ); } - // verify the required parameter 'subscription_id' is set - if ($subscription_id === null || (is_array($subscription_id) && count($subscription_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $subscription_id when calling archive' + 'Missing the required parameter $app_id when calling archive' ); } @@ -321,18 +321,18 @@ public function archiveRequest($app_id, $subscription_id, string $contentType = // path params - if ($app_id !== null) { + if ($subscription_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'subscriptionId' . '}', + ObjectSerializer::toPathValue($subscription_id), $resourcePath ); } // path params - if ($subscription_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'subscriptionId' . '}', - ObjectSerializer::toPathValue($subscription_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -1818,17 +1818,17 @@ public function getAll_0Request($app_id, string $contentType = self::contentType * * Read an event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the target subscription. (required) + * @param int $app_id The ID of the target app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response or if the response body is not in the expected format * @throws \InvalidArgumentException * @return \HubSpot\Client\Webhooks\Model\SubscriptionResponse|\HubSpot\Client\Webhooks\Model\Error */ - public function getById($app_id, $subscription_id, string $contentType = self::contentTypes['getById'][0]) + public function getById($subscription_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - list($response) = $this->getByIdWithHttpInfo($app_id, $subscription_id, $contentType); + list($response) = $this->getByIdWithHttpInfo($subscription_id, $app_id, $contentType); return $response; } @@ -1837,17 +1837,17 @@ public function getById($app_id, $subscription_id, string $contentType = self::c * * Read an event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the target subscription. (required) + * @param int $app_id The ID of the target app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \HubSpot\Client\Webhooks\ApiException on non-2xx response or if the response body is not in the expected format * @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($app_id, $subscription_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdWithHttpInfo($subscription_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - $request = $this->getByIdRequest($app_id, $subscription_id, $contentType); + $request = $this->getByIdRequest($subscription_id, $app_id, $contentType); try { $options = $this->createHttpClientOption(); @@ -1937,16 +1937,16 @@ public function getByIdWithHttpInfo($app_id, $subscription_id, string $contentTy * * Read an event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the target subscription. (required) + * @param int $app_id The ID of the target app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsync($app_id, $subscription_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsync($subscription_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - return $this->getByIdAsyncWithHttpInfo($app_id, $subscription_id, $contentType) + return $this->getByIdAsyncWithHttpInfo($subscription_id, $app_id, $contentType) ->then( function ($response) { return $response[0]; @@ -1959,17 +1959,17 @@ function ($response) { * * Read an event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the target subscription. (required) + * @param int $app_id The ID of the target app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function getByIdAsyncWithHttpInfo($app_id, $subscription_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdAsyncWithHttpInfo($subscription_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { $returnType = '\HubSpot\Client\Webhooks\Model\SubscriptionResponse'; - $request = $this->getByIdRequest($app_id, $subscription_id, $contentType); + $request = $this->getByIdRequest($subscription_id, $app_id, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2010,27 +2010,27 @@ function ($exception) { /** * Create request for operation 'getById' * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the target subscription. (required) + * @param int $app_id The ID of the target app. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['getById'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function getByIdRequest($app_id, $subscription_id, string $contentType = self::contentTypes['getById'][0]) + public function getByIdRequest($subscription_id, $app_id, string $contentType = self::contentTypes['getById'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'subscription_id' is set + if ($subscription_id === null || (is_array($subscription_id) && count($subscription_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling getById' + 'Missing the required parameter $subscription_id when calling getById' ); } - // verify the required parameter 'subscription_id' is set - if ($subscription_id === null || (is_array($subscription_id) && count($subscription_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $subscription_id when calling getById' + 'Missing the required parameter $app_id when calling getById' ); } @@ -2045,18 +2045,18 @@ public function getByIdRequest($app_id, $subscription_id, string $contentType = // path params - if ($app_id !== null) { + if ($subscription_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'subscriptionId' . '}', + ObjectSerializer::toPathValue($subscription_id), $resourcePath ); } // path params - if ($subscription_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'subscriptionId' . '}', - ObjectSerializer::toPathValue($subscription_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); } @@ -2125,8 +2125,8 @@ public function getByIdRequest($app_id, $subscription_id, string $contentType = * * Update an event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the subscription to update. (required) + * @param int $app_id The ID of the target app. (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionPatchRequest $subscription_patch_request Updated details for the subscription. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -2134,9 +2134,9 @@ public function getByIdRequest($app_id, $subscription_id, string $contentType = * @throws \InvalidArgumentException * @return \HubSpot\Client\Webhooks\Model\SubscriptionResponse|\HubSpot\Client\Webhooks\Model\Error */ - public function update($app_id, $subscription_id, $subscription_patch_request, string $contentType = self::contentTypes['update'][0]) + public function update($subscription_id, $app_id, $subscription_patch_request, string $contentType = self::contentTypes['update'][0]) { - list($response) = $this->updateWithHttpInfo($app_id, $subscription_id, $subscription_patch_request, $contentType); + list($response) = $this->updateWithHttpInfo($subscription_id, $app_id, $subscription_patch_request, $contentType); return $response; } @@ -2145,8 +2145,8 @@ public function update($app_id, $subscription_id, $subscription_patch_request, s * * Update an event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the subscription to update. (required) + * @param int $app_id The ID of the target app. (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionPatchRequest $subscription_patch_request Updated details for the subscription. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * @@ -2154,9 +2154,9 @@ public function update($app_id, $subscription_id, $subscription_patch_request, s * @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($app_id, $subscription_id, $subscription_patch_request, string $contentType = self::contentTypes['update'][0]) + public function updateWithHttpInfo($subscription_id, $app_id, $subscription_patch_request, string $contentType = self::contentTypes['update'][0]) { - $request = $this->updateRequest($app_id, $subscription_id, $subscription_patch_request, $contentType); + $request = $this->updateRequest($subscription_id, $app_id, $subscription_patch_request, $contentType); try { $options = $this->createHttpClientOption(); @@ -2246,17 +2246,17 @@ public function updateWithHttpInfo($app_id, $subscription_id, $subscription_patc * * Update an event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the subscription to update. (required) + * @param int $app_id The ID of the target app. (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionPatchRequest $subscription_patch_request Updated details for the subscription. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsync($app_id, $subscription_id, $subscription_patch_request, string $contentType = self::contentTypes['update'][0]) + public function updateAsync($subscription_id, $app_id, $subscription_patch_request, string $contentType = self::contentTypes['update'][0]) { - return $this->updateAsyncWithHttpInfo($app_id, $subscription_id, $subscription_patch_request, $contentType) + return $this->updateAsyncWithHttpInfo($subscription_id, $app_id, $subscription_patch_request, $contentType) ->then( function ($response) { return $response[0]; @@ -2269,18 +2269,18 @@ function ($response) { * * Update an event subscription * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the subscription to update. (required) + * @param int $app_id The ID of the target app. (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionPatchRequest $subscription_patch_request Updated details for the subscription. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Promise\PromiseInterface */ - public function updateAsyncWithHttpInfo($app_id, $subscription_id, $subscription_patch_request, string $contentType = self::contentTypes['update'][0]) + public function updateAsyncWithHttpInfo($subscription_id, $app_id, $subscription_patch_request, string $contentType = self::contentTypes['update'][0]) { $returnType = '\HubSpot\Client\Webhooks\Model\SubscriptionResponse'; - $request = $this->updateRequest($app_id, $subscription_id, $subscription_patch_request, $contentType); + $request = $this->updateRequest($subscription_id, $app_id, $subscription_patch_request, $contentType); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2321,28 +2321,28 @@ function ($exception) { /** * Create request for operation 'update' * - * @param int $app_id The ID of the target app. (required) * @param int $subscription_id The ID of the subscription to update. (required) + * @param int $app_id The ID of the target app. (required) * @param \HubSpot\Client\Webhooks\Model\SubscriptionPatchRequest $subscription_patch_request Updated details for the subscription. (required) * @param string $contentType The value for the Content-Type header. Check self::contentTypes['update'] to see the possible values for this operation * * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - public function updateRequest($app_id, $subscription_id, $subscription_patch_request, string $contentType = self::contentTypes['update'][0]) + public function updateRequest($subscription_id, $app_id, $subscription_patch_request, string $contentType = self::contentTypes['update'][0]) { - // verify the required parameter 'app_id' is set - if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { + // verify the required parameter 'subscription_id' is set + if ($subscription_id === null || (is_array($subscription_id) && count($subscription_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $app_id when calling update' + 'Missing the required parameter $subscription_id when calling update' ); } - // verify the required parameter 'subscription_id' is set - if ($subscription_id === null || (is_array($subscription_id) && count($subscription_id) === 0)) { + // verify the required parameter 'app_id' is set + if ($app_id === null || (is_array($app_id) && count($app_id) === 0)) { throw new \InvalidArgumentException( - 'Missing the required parameter $subscription_id when calling update' + 'Missing the required parameter $app_id when calling update' ); } @@ -2364,18 +2364,18 @@ public function updateRequest($app_id, $subscription_id, $subscription_patch_req // path params - if ($app_id !== null) { + if ($subscription_id !== null) { $resourcePath = str_replace( - '{' . 'appId' . '}', - ObjectSerializer::toPathValue($app_id), + '{' . 'subscriptionId' . '}', + ObjectSerializer::toPathValue($subscription_id), $resourcePath ); } // path params - if ($subscription_id !== null) { + if ($app_id !== null) { $resourcePath = str_replace( - '{' . 'subscriptionId' . '}', - ObjectSerializer::toPathValue($subscription_id), + '{' . 'appId' . '}', + ObjectSerializer::toPathValue($app_id), $resourcePath ); }