From df7d5d8d46173dfdb4699d2fa26c53e84afcc4c8 Mon Sep 17 00:00:00 2001 From: pipedrive-bot Date: Thu, 25 Jun 2026 09:38:26 +0000 Subject: [PATCH] Build 336 - version-minor --- CHANGELOG.md | 3 ++ docs/versions/v1/Api/DealsApi.md | 6 ++-- docs/versions/v1/Api/OrganizationsApi.md | 6 ++-- docs/versions/v1/Api/PersonsApi.md | 6 ++-- docs/versions/v1/Model/MailMessageData.md | 1 + .../v1/Model/MailMessageItemForList.md | 1 + .../v2/Model/ActivityFieldItemOptions.md | 2 +- docs/versions/v2/Model/DealFieldItem.md | 2 +- docs/versions/v2/Model/DeleteDealFieldData.md | 2 +- lib/versions/v1/Api/DealsApi.php | 33 +++++++++++++------ lib/versions/v1/Api/OrganizationsApi.php | 33 +++++++++++++------ lib/versions/v1/Api/PersonsApi.php | 33 +++++++++++++------ lib/versions/v1/Model/MailMessageData.php | 30 +++++++++++++++++ .../v1/Model/MailMessageItemForList.php | 30 +++++++++++++++++ .../v2/Model/ActivityFieldItemOptions.php | 6 ++-- lib/versions/v2/Model/DealFieldItem.php | 7 ++-- lib/versions/v2/Model/DeleteDealFieldData.php | 7 ++-- 17 files changed, 156 insertions(+), 52 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cd84907c..f187302d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). ## [Unreleased] +### Added +- Added `include_body` query parameter to `GET /v1/deals/{id}/mailMessages`, `GET /v1/persons/{id}/mailMessages`, and `GET /v1/organizations/{id}/mailMessages` — pass `1` to include the mail message body content in the response +- Added `body` field to `MailMessageData` schema to expose the mail message body content when `include_body=1` is used ## [17.3.0](https://github.com/pipedrive/client-php/compare17.2.1...17.3.0) (2026-04-06) diff --git a/docs/versions/v1/Api/DealsApi.md b/docs/versions/v1/Api/DealsApi.md index ac02c8a3..c25de86f 100644 --- a/docs/versions/v1/Api/DealsApi.md +++ b/docs/versions/v1/Api/DealsApi.md @@ -807,7 +807,7 @@ Name | Type | Description | Notes ## `getDealMailMessages()` ```php -getDealMailMessages($id, $start, $limit): \Pipedrive\versions\v1\Model\ListMailMessagesResponse +getDealMailMessages($id, $start, $limit, $include_body): \Pipedrive\versions\v1\Model\ListMailMessagesResponse ``` List mail messages associated with a deal @@ -839,9 +839,10 @@ $apiInstance = new Pipedrive\versions\v1\Api\DealsApi( $id = 56; // int | The ID of the deal $start = 0; // int | Pagination start $limit = 56; // int | Items shown per page +$include_body = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBooleanDefault0(); // \Pipedrive\versions\v1\Model\NumberBooleanDefault0 | Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. try { - $result = $apiInstance->getDealMailMessages($id, $start, $limit); + $result = $apiInstance->getDealMailMessages($id, $start, $limit, $include_body); print_r($result); } catch (Exception $e) { echo 'Exception when calling DealsApi->getDealMailMessages: ', $e->getMessage(), PHP_EOL; @@ -855,6 +856,7 @@ Name | Type | Description | Notes **id** | **int**| The ID of the deal | **start** | **int**| Pagination start | [optional] [default to 0] **limit** | **int**| Items shown per page | [optional] + **include_body** | [**\Pipedrive\versions\v1\Model\NumberBooleanDefault0**](../Model/.md)| Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. | [optional] ### Return type diff --git a/docs/versions/v1/Api/OrganizationsApi.md b/docs/versions/v1/Api/OrganizationsApi.md index 5d44b77d..42751a57 100644 --- a/docs/versions/v1/Api/OrganizationsApi.md +++ b/docs/versions/v1/Api/OrganizationsApi.md @@ -357,7 +357,7 @@ Name | Type | Description | Notes ## `getOrganizationMailMessages()` ```php -getOrganizationMailMessages($id, $start, $limit): \Pipedrive\versions\v1\Model\ListMailMessagesResponse +getOrganizationMailMessages($id, $start, $limit, $include_body): \Pipedrive\versions\v1\Model\ListMailMessagesResponse ``` List mail messages associated with an organization @@ -389,9 +389,10 @@ $apiInstance = new Pipedrive\versions\v1\Api\OrganizationsApi( $id = 56; // int | The ID of the organization $start = 0; // int | Pagination start $limit = 56; // int | Items shown per page +$include_body = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBooleanDefault0(); // \Pipedrive\versions\v1\Model\NumberBooleanDefault0 | Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. try { - $result = $apiInstance->getOrganizationMailMessages($id, $start, $limit); + $result = $apiInstance->getOrganizationMailMessages($id, $start, $limit, $include_body); print_r($result); } catch (Exception $e) { echo 'Exception when calling OrganizationsApi->getOrganizationMailMessages: ', $e->getMessage(), PHP_EOL; @@ -405,6 +406,7 @@ Name | Type | Description | Notes **id** | **int**| The ID of the organization | **start** | **int**| Pagination start | [optional] [default to 0] **limit** | **int**| Items shown per page | [optional] + **include_body** | [**\Pipedrive\versions\v1\Model\NumberBooleanDefault0**](../Model/.md)| Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. | [optional] ### Return type diff --git a/docs/versions/v1/Api/PersonsApi.md b/docs/versions/v1/Api/PersonsApi.md index 72f2a776..84b55dc5 100644 --- a/docs/versions/v1/Api/PersonsApi.md +++ b/docs/versions/v1/Api/PersonsApi.md @@ -500,7 +500,7 @@ Name | Type | Description | Notes ## `getPersonMailMessages()` ```php -getPersonMailMessages($id, $start, $limit): \Pipedrive\versions\v1\Model\ListMailMessagesResponse +getPersonMailMessages($id, $start, $limit, $include_body): \Pipedrive\versions\v1\Model\ListMailMessagesResponse ``` List mail messages associated with a person @@ -532,9 +532,10 @@ $apiInstance = new Pipedrive\versions\v1\Api\PersonsApi( $id = 56; // int | The ID of the person $start = 0; // int | Pagination start $limit = 56; // int | Items shown per page +$include_body = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBooleanDefault0(); // \Pipedrive\versions\v1\Model\NumberBooleanDefault0 | Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. try { - $result = $apiInstance->getPersonMailMessages($id, $start, $limit); + $result = $apiInstance->getPersonMailMessages($id, $start, $limit, $include_body); print_r($result); } catch (Exception $e) { echo 'Exception when calling PersonsApi->getPersonMailMessages: ', $e->getMessage(), PHP_EOL; @@ -548,6 +549,7 @@ Name | Type | Description | Notes **id** | **int**| The ID of the person | **start** | **int**| Pagination start | [optional] [default to 0] **limit** | **int**| Items shown per page | [optional] + **include_body** | [**\Pipedrive\versions\v1\Model\NumberBooleanDefault0**](../Model/.md)| Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. | [optional] ### Return type diff --git a/docs/versions/v1/Model/MailMessageData.md b/docs/versions/v1/Model/MailMessageData.md index bb612f59..480bc248 100644 --- a/docs/versions/v1/Model/MailMessageData.md +++ b/docs/versions/v1/Model/MailMessageData.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **cc** | [**\Pipedrive\versions\v1\Model\MailParticipant[]**](MailParticipant.md) | The array of mail message copies (object) | [optional] **bcc** | [**\Pipedrive\versions\v1\Model\MailParticipant[]**](MailParticipant.md) | The array of mail message blind copies (object) | [optional] **body_url** | **string** | The mail message body URL | [optional] +**body** | **string** | The mail message body content. Only present when `include_body=1` is passed. | [optional] **account_id** | **string** | The connection account ID | [optional] **user_id** | **int** | ID of the user whom mail message will be assigned to | [optional] **mail_thread_id** | **int** | ID of the mail message thread | [optional] diff --git a/docs/versions/v1/Model/MailMessageItemForList.md b/docs/versions/v1/Model/MailMessageItemForList.md index 79e7ac64..d2ede8bb 100644 --- a/docs/versions/v1/Model/MailMessageItemForList.md +++ b/docs/versions/v1/Model/MailMessageItemForList.md @@ -10,6 +10,7 @@ Name | Type | Description | Notes **cc** | [**\Pipedrive\versions\v1\Model\MailParticipant[]**](MailParticipant.md) | The array of mail message copies (object) | [optional] **bcc** | [**\Pipedrive\versions\v1\Model\MailParticipant[]**](MailParticipant.md) | The array of mail message blind copies (object) | [optional] **body_url** | **string** | The mail message body URL | [optional] +**body** | **string** | The mail message body content. Only present when `include_body=1` is passed. | [optional] **account_id** | **string** | The connection account ID | [optional] **user_id** | **int** | ID of the user whom mail message will be assigned to | [optional] **mail_thread_id** | **int** | ID of the mail message thread | [optional] diff --git a/docs/versions/v2/Model/ActivityFieldItemOptions.md b/docs/versions/v2/Model/ActivityFieldItemOptions.md index 289f2b55..f743b393 100644 --- a/docs/versions/v2/Model/ActivityFieldItemOptions.md +++ b/docs/versions/v2/Model/ActivityFieldItemOptions.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**id** | **int** | The option ID | [optional] +**id** | [**OneOfIntegerString**](OneOfIntegerString.md) | The option ID (integer for custom fields, string for built-in fields) | [optional] **label** | **string** | The option display label | [optional] **color** | **string** | Optional color code for the option | [optional] **update_time** | **\DateTime** | When the option was last updated | [optional] diff --git a/docs/versions/v2/Model/DealFieldItem.md b/docs/versions/v2/Model/DealFieldItem.md index f8062055..6b8e7c15 100644 --- a/docs/versions/v2/Model/DealFieldItem.md +++ b/docs/versions/v2/Model/DealFieldItem.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **field_name** | **string** | The display name/label of the field | **field_code** | **string** | The unique identifier for the field (40-character hash for custom fields) | -**description** | **string** | The description of the field | +**description** | **string** | The description of the field | [optional] **field_type** | **string** | The type of the field | **options** | [**\Pipedrive\versions\v2\Model\ActivityFieldItemOptions[]**](ActivityFieldItemOptions.md) | Array of available options for enum/set fields, null for other field types | [optional] **subfields** | [**\Pipedrive\versions\v2\Model\ActivityFieldItemSubfields[]**](ActivityFieldItemSubfields.md) | Array of subfields for complex field types (address, monetary), null for simple field types | [optional] diff --git a/docs/versions/v2/Model/DeleteDealFieldData.md b/docs/versions/v2/Model/DeleteDealFieldData.md index 765aa6c0..7e035ad9 100644 --- a/docs/versions/v2/Model/DeleteDealFieldData.md +++ b/docs/versions/v2/Model/DeleteDealFieldData.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **field_name** | **string** | The display name/label of the field | **field_code** | **string** | The unique identifier for the field (40-character hash for custom fields) | -**description** | **string** | The description of the field | +**description** | **string** | The description of the field | [optional] **field_type** | **string** | The type of the field | **options** | **object[]** | Array of available options for enum/set fields, null for other field types | [optional] **subfields** | **object[]** | Array of subfields for complex field types (address, monetary), null for simple field types | [optional] diff --git a/lib/versions/v1/Api/DealsApi.php b/lib/versions/v1/Api/DealsApi.php index a6760dbf..c7e1111b 100644 --- a/lib/versions/v1/Api/DealsApi.php +++ b/lib/versions/v1/Api/DealsApi.php @@ -3838,14 +3838,15 @@ public function getDealFollowersRequest($id): Request * @param int $id The ID of the deal (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException * @return \Pipedrive\versions\v1\Model\ListMailMessagesResponse */ - public function getDealMailMessages($id, $start = 0, $limit = null) + public function getDealMailMessages($id, $start = 0, $limit = null, $include_body = null) { - list($response) = $this->getDealMailMessagesWithHttpInfo($id, $start, $limit); + list($response) = $this->getDealMailMessagesWithHttpInfo($id, $start, $limit, $include_body); return $response; } @@ -3857,14 +3858,15 @@ public function getDealMailMessages($id, $start = 0, $limit = null) * @param int $id The ID of the deal (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException * @return array of \Pipedrive\versions\v1\Model\ListMailMessagesResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getDealMailMessagesWithHttpInfo($id, $start = 0, $limit = null) + public function getDealMailMessagesWithHttpInfo($id, $start = 0, $limit = null, $include_body = null) { - $request = $this->getDealMailMessagesRequest($id, $start, $limit); + $request = $this->getDealMailMessagesRequest($id, $start, $limit, $include_body); try { $options = $this->createHttpClientOption(); @@ -3873,7 +3875,7 @@ public function getDealMailMessagesWithHttpInfo($id, $start = 0, $limit = null) } catch (RequestException $e) { if ($e->getCode() === 401 && $this->config->isRefreshPossible()) { $this->config->refreshToken(); - $request = $this->getDealMailMessagesRequest($id, $start, $limit); + $request = $this->getDealMailMessagesRequest($id, $start, $limit, $include_body); $response = $this->client->send($request, $options); } else { throw new ApiException( @@ -3960,13 +3962,14 @@ public function getDealMailMessagesWithHttpInfo($id, $start = 0, $limit = null) * @param int $id The ID of the deal (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface */ - public function getDealMailMessagesAsync($id, $start = 0, $limit = null): PromiseInterface + public function getDealMailMessagesAsync($id, $start = 0, $limit = null, $include_body = null): PromiseInterface { - return $this->getDealMailMessagesAsyncWithHttpInfo($id, $start, $limit) + return $this->getDealMailMessagesAsyncWithHttpInfo($id, $start, $limit, $include_body) ->then( function ($response) { return $response[0]; @@ -3982,14 +3985,15 @@ function ($response) { * @param int $id The ID of the deal (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface */ - public function getDealMailMessagesAsyncWithHttpInfo($id, $start = 0, $limit = null): PromiseInterface + public function getDealMailMessagesAsyncWithHttpInfo($id, $start = 0, $limit = null, $include_body = null): PromiseInterface { $returnType = '\Pipedrive\versions\v1\Model\ListMailMessagesResponse'; - $request = $this->getDealMailMessagesRequest($id, $start, $limit); + $request = $this->getDealMailMessagesRequest($id, $start, $limit, $include_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -4031,11 +4035,12 @@ function ($exception) { * @param int $id The ID of the deal (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return Request */ - public function getDealMailMessagesRequest($id, $start = 0, $limit = null): Request + public function getDealMailMessagesRequest($id, $start = 0, $limit = null, $include_body = null): Request { // verify the required parameter 'id' is set /* @phpstan-ignore-next-line */ @@ -4068,6 +4073,14 @@ public function getDealMailMessagesRequest($id, $start = 0, $limit = null): Requ if ($limit !== null) { $queryParams['limit'] = $limit; } + // query params + /* @phpstan-ignore-next-line */ + if (is_array($include_body)) { + $include_body = ObjectSerializer::serializeCollection($include_body, '', true); + } + if ($include_body !== null) { + $queryParams['include_body'] = $include_body; + } // path params diff --git a/lib/versions/v1/Api/OrganizationsApi.php b/lib/versions/v1/Api/OrganizationsApi.php index e0332e6b..ee0ea5b1 100644 --- a/lib/versions/v1/Api/OrganizationsApi.php +++ b/lib/versions/v1/Api/OrganizationsApi.php @@ -1710,14 +1710,15 @@ public function getOrganizationFollowersRequest($id): Request * @param int $id The ID of the organization (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException * @return \Pipedrive\versions\v1\Model\ListMailMessagesResponse */ - public function getOrganizationMailMessages($id, $start = 0, $limit = null) + public function getOrganizationMailMessages($id, $start = 0, $limit = null, $include_body = null) { - list($response) = $this->getOrganizationMailMessagesWithHttpInfo($id, $start, $limit); + list($response) = $this->getOrganizationMailMessagesWithHttpInfo($id, $start, $limit, $include_body); return $response; } @@ -1729,14 +1730,15 @@ public function getOrganizationMailMessages($id, $start = 0, $limit = null) * @param int $id The ID of the organization (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException * @return array of \Pipedrive\versions\v1\Model\ListMailMessagesResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getOrganizationMailMessagesWithHttpInfo($id, $start = 0, $limit = null) + public function getOrganizationMailMessagesWithHttpInfo($id, $start = 0, $limit = null, $include_body = null) { - $request = $this->getOrganizationMailMessagesRequest($id, $start, $limit); + $request = $this->getOrganizationMailMessagesRequest($id, $start, $limit, $include_body); try { $options = $this->createHttpClientOption(); @@ -1745,7 +1747,7 @@ public function getOrganizationMailMessagesWithHttpInfo($id, $start = 0, $limit } catch (RequestException $e) { if ($e->getCode() === 401 && $this->config->isRefreshPossible()) { $this->config->refreshToken(); - $request = $this->getOrganizationMailMessagesRequest($id, $start, $limit); + $request = $this->getOrganizationMailMessagesRequest($id, $start, $limit, $include_body); $response = $this->client->send($request, $options); } else { throw new ApiException( @@ -1832,13 +1834,14 @@ public function getOrganizationMailMessagesWithHttpInfo($id, $start = 0, $limit * @param int $id The ID of the organization (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface */ - public function getOrganizationMailMessagesAsync($id, $start = 0, $limit = null): PromiseInterface + public function getOrganizationMailMessagesAsync($id, $start = 0, $limit = null, $include_body = null): PromiseInterface { - return $this->getOrganizationMailMessagesAsyncWithHttpInfo($id, $start, $limit) + return $this->getOrganizationMailMessagesAsyncWithHttpInfo($id, $start, $limit, $include_body) ->then( function ($response) { return $response[0]; @@ -1854,14 +1857,15 @@ function ($response) { * @param int $id The ID of the organization (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface */ - public function getOrganizationMailMessagesAsyncWithHttpInfo($id, $start = 0, $limit = null): PromiseInterface + public function getOrganizationMailMessagesAsyncWithHttpInfo($id, $start = 0, $limit = null, $include_body = null): PromiseInterface { $returnType = '\Pipedrive\versions\v1\Model\ListMailMessagesResponse'; - $request = $this->getOrganizationMailMessagesRequest($id, $start, $limit); + $request = $this->getOrganizationMailMessagesRequest($id, $start, $limit, $include_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1903,11 +1907,12 @@ function ($exception) { * @param int $id The ID of the organization (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return Request */ - public function getOrganizationMailMessagesRequest($id, $start = 0, $limit = null): Request + public function getOrganizationMailMessagesRequest($id, $start = 0, $limit = null, $include_body = null): Request { // verify the required parameter 'id' is set /* @phpstan-ignore-next-line */ @@ -1940,6 +1945,14 @@ public function getOrganizationMailMessagesRequest($id, $start = 0, $limit = nul if ($limit !== null) { $queryParams['limit'] = $limit; } + // query params + /* @phpstan-ignore-next-line */ + if (is_array($include_body)) { + $include_body = ObjectSerializer::serializeCollection($include_body, '', true); + } + if ($include_body !== null) { + $queryParams['include_body'] = $include_body; + } // path params diff --git a/lib/versions/v1/Api/PersonsApi.php b/lib/versions/v1/Api/PersonsApi.php index bc7d7632..cf652211 100644 --- a/lib/versions/v1/Api/PersonsApi.php +++ b/lib/versions/v1/Api/PersonsApi.php @@ -2363,14 +2363,15 @@ public function getPersonFollowersRequest($id): Request * @param int $id The ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException * @return \Pipedrive\versions\v1\Model\ListMailMessagesResponse */ - public function getPersonMailMessages($id, $start = 0, $limit = null) + public function getPersonMailMessages($id, $start = 0, $limit = null, $include_body = null) { - list($response) = $this->getPersonMailMessagesWithHttpInfo($id, $start, $limit); + list($response) = $this->getPersonMailMessagesWithHttpInfo($id, $start, $limit, $include_body); return $response; } @@ -2382,14 +2383,15 @@ public function getPersonMailMessages($id, $start = 0, $limit = null) * @param int $id The ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException * @return array of \Pipedrive\versions\v1\Model\ListMailMessagesResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getPersonMailMessagesWithHttpInfo($id, $start = 0, $limit = null) + public function getPersonMailMessagesWithHttpInfo($id, $start = 0, $limit = null, $include_body = null) { - $request = $this->getPersonMailMessagesRequest($id, $start, $limit); + $request = $this->getPersonMailMessagesRequest($id, $start, $limit, $include_body); try { $options = $this->createHttpClientOption(); @@ -2398,7 +2400,7 @@ public function getPersonMailMessagesWithHttpInfo($id, $start = 0, $limit = null } catch (RequestException $e) { if ($e->getCode() === 401 && $this->config->isRefreshPossible()) { $this->config->refreshToken(); - $request = $this->getPersonMailMessagesRequest($id, $start, $limit); + $request = $this->getPersonMailMessagesRequest($id, $start, $limit, $include_body); $response = $this->client->send($request, $options); } else { throw new ApiException( @@ -2485,13 +2487,14 @@ public function getPersonMailMessagesWithHttpInfo($id, $start = 0, $limit = null * @param int $id The ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface */ - public function getPersonMailMessagesAsync($id, $start = 0, $limit = null): PromiseInterface + public function getPersonMailMessagesAsync($id, $start = 0, $limit = null, $include_body = null): PromiseInterface { - return $this->getPersonMailMessagesAsyncWithHttpInfo($id, $start, $limit) + return $this->getPersonMailMessagesAsyncWithHttpInfo($id, $start, $limit, $include_body) ->then( function ($response) { return $response[0]; @@ -2507,14 +2510,15 @@ function ($response) { * @param int $id The ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface */ - public function getPersonMailMessagesAsyncWithHttpInfo($id, $start = 0, $limit = null): PromiseInterface + public function getPersonMailMessagesAsyncWithHttpInfo($id, $start = 0, $limit = null, $include_body = null): PromiseInterface { $returnType = '\Pipedrive\versions\v1\Model\ListMailMessagesResponse'; - $request = $this->getPersonMailMessagesRequest($id, $start, $limit); + $request = $this->getPersonMailMessagesRequest($id, $start, $limit, $include_body); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2556,11 +2560,12 @@ function ($exception) { * @param int $id The ID of the person (required) * @param int|0 $start Pagination start (optional, default to 0) * @param int|null $limit Items shown per page (optional) + * @param \Pipedrive\versions\v1\Model\NumberBooleanDefault0|null $include_body Whether to include the mail message body content in the response. `0` = Don't include, `1` = Include. (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return Request */ - public function getPersonMailMessagesRequest($id, $start = 0, $limit = null): Request + public function getPersonMailMessagesRequest($id, $start = 0, $limit = null, $include_body = null): Request { // verify the required parameter 'id' is set /* @phpstan-ignore-next-line */ @@ -2593,6 +2598,14 @@ public function getPersonMailMessagesRequest($id, $start = 0, $limit = null): Re if ($limit !== null) { $queryParams['limit'] = $limit; } + // query params + /* @phpstan-ignore-next-line */ + if (is_array($include_body)) { + $include_body = ObjectSerializer::serializeCollection($include_body, '', true); + } + if ($include_body !== null) { + $queryParams['include_body'] = $include_body; + } // path params diff --git a/lib/versions/v1/Model/MailMessageData.php b/lib/versions/v1/Model/MailMessageData.php index 93e78400..a7abc990 100644 --- a/lib/versions/v1/Model/MailMessageData.php +++ b/lib/versions/v1/Model/MailMessageData.php @@ -72,6 +72,7 @@ class MailMessageData implements ModelInterface, ArrayAccess, JsonSerializable 'cc' => '\Pipedrive\versions\v1\Model\MailParticipant[]', 'bcc' => '\Pipedrive\versions\v1\Model\MailParticipant[]', 'body_url' => 'string', + 'body' => 'string', 'account_id' => 'string', 'user_id' => 'int', 'mail_thread_id' => 'int', @@ -110,6 +111,7 @@ class MailMessageData implements ModelInterface, ArrayAccess, JsonSerializable 'cc' => null, 'bcc' => null, 'body_url' => null, + 'body' => null, 'account_id' => null, 'user_id' => null, 'mail_thread_id' => null, @@ -171,6 +173,7 @@ public static function openAPIFormats(): array 'cc' => 'cc', 'bcc' => 'bcc', 'body_url' => 'body_url', + 'body' => 'body', 'account_id' => 'account_id', 'user_id' => 'user_id', 'mail_thread_id' => 'mail_thread_id', @@ -207,6 +210,7 @@ public static function openAPIFormats(): array 'cc' => 'setCc', 'bcc' => 'setBcc', 'body_url' => 'setBodyUrl', + 'body' => 'setBody', 'account_id' => 'setAccountId', 'user_id' => 'setUserId', 'mail_thread_id' => 'setMailThreadId', @@ -243,6 +247,7 @@ public static function openAPIFormats(): array 'cc' => 'getCc', 'bcc' => 'getBcc', 'body_url' => 'getBodyUrl', + 'body' => 'getBody', 'account_id' => 'getAccountId', 'user_id' => 'getUserId', 'mail_thread_id' => 'getMailThreadId', @@ -357,6 +362,7 @@ public function __construct(?array $data = null) $this->container['cc'] = $data['cc'] ?? null; $this->container['bcc'] = $data['bcc'] ?? null; $this->container['body_url'] = $data['body_url'] ?? null; + $this->container['body'] = $data['body'] ?? null; $this->container['account_id'] = $data['account_id'] ?? null; $this->container['user_id'] = $data['user_id'] ?? null; $this->container['mail_thread_id'] = $data['mail_thread_id'] ?? null; @@ -560,6 +566,30 @@ public function setBodyUrl($body_url): self return $this; } + /** + * Gets body + * + * @return string|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param string|null $body The mail message body content. Only present when `include_body=1` is passed. + * + * @return self + */ + public function setBody($body): self + { + $this->container['body'] = $body; + + return $this; + } + /** * Gets account_id * diff --git a/lib/versions/v1/Model/MailMessageItemForList.php b/lib/versions/v1/Model/MailMessageItemForList.php index 54f3efd3..caafb0ea 100644 --- a/lib/versions/v1/Model/MailMessageItemForList.php +++ b/lib/versions/v1/Model/MailMessageItemForList.php @@ -72,6 +72,7 @@ class MailMessageItemForList implements ModelInterface, ArrayAccess, JsonSeriali 'cc' => '\Pipedrive\versions\v1\Model\MailParticipant[]', 'bcc' => '\Pipedrive\versions\v1\Model\MailParticipant[]', 'body_url' => 'string', + 'body' => 'string', 'account_id' => 'string', 'user_id' => 'int', 'mail_thread_id' => 'int', @@ -119,6 +120,7 @@ class MailMessageItemForList implements ModelInterface, ArrayAccess, JsonSeriali 'cc' => null, 'bcc' => null, 'body_url' => null, + 'body' => null, 'account_id' => null, 'user_id' => null, 'mail_thread_id' => null, @@ -189,6 +191,7 @@ public static function openAPIFormats(): array 'cc' => 'cc', 'bcc' => 'bcc', 'body_url' => 'body_url', + 'body' => 'body', 'account_id' => 'account_id', 'user_id' => 'user_id', 'mail_thread_id' => 'mail_thread_id', @@ -234,6 +237,7 @@ public static function openAPIFormats(): array 'cc' => 'setCc', 'bcc' => 'setBcc', 'body_url' => 'setBodyUrl', + 'body' => 'setBody', 'account_id' => 'setAccountId', 'user_id' => 'setUserId', 'mail_thread_id' => 'setMailThreadId', @@ -279,6 +283,7 @@ public static function openAPIFormats(): array 'cc' => 'getCc', 'bcc' => 'getBcc', 'body_url' => 'getBodyUrl', + 'body' => 'getBody', 'account_id' => 'getAccountId', 'user_id' => 'getUserId', 'mail_thread_id' => 'getMailThreadId', @@ -402,6 +407,7 @@ public function __construct(?array $data = null) $this->container['cc'] = $data['cc'] ?? null; $this->container['bcc'] = $data['bcc'] ?? null; $this->container['body_url'] = $data['body_url'] ?? null; + $this->container['body'] = $data['body'] ?? null; $this->container['account_id'] = $data['account_id'] ?? null; $this->container['user_id'] = $data['user_id'] ?? null; $this->container['mail_thread_id'] = $data['mail_thread_id'] ?? null; @@ -614,6 +620,30 @@ public function setBodyUrl($body_url): self return $this; } + /** + * Gets body + * + * @return string|null + */ + public function getBody() + { + return $this->container['body']; + } + + /** + * Sets body + * + * @param string|null $body The mail message body content. Only present when `include_body=1` is passed. + * + * @return self + */ + public function setBody($body): self + { + $this->container['body'] = $body; + + return $this; + } + /** * Gets account_id * diff --git a/lib/versions/v2/Model/ActivityFieldItemOptions.php b/lib/versions/v2/Model/ActivityFieldItemOptions.php index dbad29e9..02bd1a40 100644 --- a/lib/versions/v2/Model/ActivityFieldItemOptions.php +++ b/lib/versions/v2/Model/ActivityFieldItemOptions.php @@ -66,7 +66,7 @@ class ActivityFieldItemOptions implements ModelInterface, ArrayAccess, JsonSeria * @phpsalm-var array */ protected static array $openAPITypes = [ - 'id' => 'int', + 'id' => 'OneOfIntegerString', 'label' => 'string', 'color' => 'string', 'update_time' => '\DateTime', @@ -255,7 +255,7 @@ public function valid(): bool /** * Gets id * - * @return int|null + * @return OneOfIntegerString|null */ public function getId() { @@ -265,7 +265,7 @@ public function getId() /** * Sets id * - * @param int|null $id The option ID + * @param OneOfIntegerString|null $id The option ID (integer for custom fields, string for built-in fields) * * @return self */ diff --git a/lib/versions/v2/Model/DealFieldItem.php b/lib/versions/v2/Model/DealFieldItem.php index abcdde76..5fe6c01d 100644 --- a/lib/versions/v2/Model/DealFieldItem.php +++ b/lib/versions/v2/Model/DealFieldItem.php @@ -358,9 +358,6 @@ public function listInvalidProperties(): array if ($this->container['field_code'] === null) { $invalidProperties[] = "'field_code' can't be null"; } - if ($this->container['description'] === null) { - $invalidProperties[] = "'description' can't be null"; - } if ($this->container['field_type'] === null) { $invalidProperties[] = "'field_type' can't be null"; } @@ -445,7 +442,7 @@ public function setFieldCode($field_code): self /** * Gets description * - * @return string + * @return string|null */ public function getDescription() { @@ -455,7 +452,7 @@ public function getDescription() /** * Sets description * - * @param string $description The description of the field + * @param string|null $description The description of the field * * @return self */ diff --git a/lib/versions/v2/Model/DeleteDealFieldData.php b/lib/versions/v2/Model/DeleteDealFieldData.php index bdbbc4bc..a3466746 100644 --- a/lib/versions/v2/Model/DeleteDealFieldData.php +++ b/lib/versions/v2/Model/DeleteDealFieldData.php @@ -261,9 +261,6 @@ public function listInvalidProperties(): array if ($this->container['field_code'] === null) { $invalidProperties[] = "'field_code' can't be null"; } - if ($this->container['description'] === null) { - $invalidProperties[] = "'description' can't be null"; - } if ($this->container['field_type'] === null) { $invalidProperties[] = "'field_type' can't be null"; } @@ -339,7 +336,7 @@ public function setFieldCode($field_code): self /** * Gets description * - * @return string + * @return string|null */ public function getDescription() { @@ -349,7 +346,7 @@ public function getDescription() /** * Sets description * - * @param string $description The description of the field + * @param string|null $description The description of the field * * @return self */