diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ee9c48..499f794 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - `DELETE /v1/stages` Please use the single delete endpoints instead, for example `DELETE /api/v2/activities/{id}`. +### Added +- Added `updated_since` query parameter to `GET /v1/leads` endpoint to filter leads by their `update_time` +- Added `updated_since` query parameter to `GET /v1/notes` endpoint to filter notes by their `update_time` + +## [15.1.0](https://github.com/pipedrive/client-php/compare/15.0.0...15.1.0) (2026-01-27) + ## [15.0.0](https://github.com/pipedrive/client-php/compare/14.9.0...15.0.0) (2026-01-27) ## [14.9.0](https://github.com/pipedrive/client-php/compare/14.8.0...14.9.0) (2026-01-27) diff --git a/docs/versions/v1/Api/LeadsApi.md b/docs/versions/v1/Api/LeadsApi.md index 7810e73..97be91a 100644 --- a/docs/versions/v1/Api/LeadsApi.md +++ b/docs/versions/v1/Api/LeadsApi.md @@ -354,7 +354,7 @@ Name | Type | Description | Notes ## `getLeads()` ```php -getLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort): \Pipedrive\versions\v1\Model\GetLeadsResponse +getLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $updated_since, $sort): \Pipedrive\versions\v1\Model\GetLeadsResponse ``` Get all leads @@ -389,10 +389,11 @@ $owner_id = 1; // int | If supplied, only leads matching the given user will be $person_id = 1; // int | If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. $organization_id = 1; // int | If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. $filter_id = 1; // int | The ID of the filter to use +$updated_since = 2025-01-01T10:20:00Z; // string | If set, only leads with an `update_time` later than or equal to this time are returned. In ISO 8601 format, e.g. 2025-01-01T10:20:00Z. $sort = 'sort_example'; // string | The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). try { - $result = $apiInstance->getLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort); + $result = $apiInstance->getLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $updated_since, $sort); print_r($result); } catch (Exception $e) { echo 'Exception when calling LeadsApi->getLeads: ', $e->getMessage(), PHP_EOL; @@ -409,6 +410,7 @@ Name | Type | Description | Notes **person_id** | **int**| If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. | [optional] **organization_id** | **int**| If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. | [optional] **filter_id** | **int**| The ID of the filter to use | [optional] + **updated_since** | **string**| If set, only leads with an `update_time` later than or equal to this time are returned. In ISO 8601 format, e.g. 2025-01-01T10:20:00Z. | [optional] **sort** | **string**| The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). | [optional] ### Return type diff --git a/docs/versions/v1/Api/NotesApi.md b/docs/versions/v1/Api/NotesApi.md index 3b26b17..0c1af19 100644 --- a/docs/versions/v1/Api/NotesApi.md +++ b/docs/versions/v1/Api/NotesApi.md @@ -484,7 +484,7 @@ Name | Type | Description | Notes ## `getNotes()` ```php -getNotes($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag): \Pipedrive\versions\v1\Model\GetNotes +getNotes($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $updated_since, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag): \Pipedrive\versions\v1\Model\GetNotes ``` Get all notes @@ -524,6 +524,7 @@ $limit = 56; // int | Items shown per page $sort = 'sort_example'; // string | The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`. $start_date = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The date in format of YYYY-MM-DD from which notes to fetch $end_date = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The date in format of YYYY-MM-DD until which notes to fetch to +$updated_since = 2025-01-01T10:20Z; // \DateTime | If set, only notes with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. $pinned_to_lead_flag = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBoolean(); // \Pipedrive\versions\v1\Model\NumberBoolean | If set, the results are filtered by note to lead pinning state $pinned_to_deal_flag = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBoolean(); // \Pipedrive\versions\v1\Model\NumberBoolean | If set, the results are filtered by note to deal pinning state $pinned_to_organization_flag = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBoolean(); // \Pipedrive\versions\v1\Model\NumberBoolean | If set, the results are filtered by note to organization pinning state @@ -531,7 +532,7 @@ $pinned_to_person_flag = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1 $pinned_to_project_flag = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBoolean(); // \Pipedrive\versions\v1\Model\NumberBoolean | If set, the results are filtered by note to project pinning state try { - $result = $apiInstance->getNotes($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag); + $result = $apiInstance->getNotes($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $updated_since, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag); print_r($result); } catch (Exception $e) { echo 'Exception when calling NotesApi->getNotes: ', $e->getMessage(), PHP_EOL; @@ -553,6 +554,7 @@ Name | Type | Description | Notes **sort** | **string**| The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`. | [optional] **start_date** | **\DateTime**| The date in format of YYYY-MM-DD from which notes to fetch | [optional] **end_date** | **\DateTime**| The date in format of YYYY-MM-DD until which notes to fetch to | [optional] + **updated_since** | **\DateTime**| If set, only notes with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. | [optional] **pinned_to_lead_flag** | [**\Pipedrive\versions\v1\Model\NumberBoolean**](../Model/.md)| If set, the results are filtered by note to lead pinning state | [optional] **pinned_to_deal_flag** | [**\Pipedrive\versions\v1\Model\NumberBoolean**](../Model/.md)| If set, the results are filtered by note to deal pinning state | [optional] **pinned_to_organization_flag** | [**\Pipedrive\versions\v1\Model\NumberBoolean**](../Model/.md)| If set, the results are filtered by note to organization pinning state | [optional] diff --git a/lib/versions/v1/Api/LeadsApi.php b/lib/versions/v1/Api/LeadsApi.php index 9a89e6c..49c1e89 100644 --- a/lib/versions/v1/Api/LeadsApi.php +++ b/lib/versions/v1/Api/LeadsApi.php @@ -1717,15 +1717,16 @@ public function getLeadUsersRequest($id): Request * @param int|null $person_id If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. (optional) * @param int|null $organization_id If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. (optional) * @param int|null $filter_id The ID of the filter to use (optional) + * @param string|null $updated_since If set, only leads with an `update_time` later than or equal to this time are returned. In ISO 8601 format, e.g. 2025-01-01T10:20:00Z. (optional) * @param string|null $sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). (optional) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException * @return \Pipedrive\versions\v1\Model\GetLeadsResponse */ - public function getLeads($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $sort = null) + public function getLeads($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $updated_since = null, $sort = null) { - list($response) = $this->getLeadsWithHttpInfo($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort); + list($response) = $this->getLeadsWithHttpInfo($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $updated_since, $sort); return $response; } @@ -1740,15 +1741,16 @@ public function getLeads($limit = null, $start = null, $owner_id = null, $person * @param int|null $person_id If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. (optional) * @param int|null $organization_id If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. (optional) * @param int|null $filter_id The ID of the filter to use (optional) + * @param string|null $updated_since If set, only leads with an `update_time` later than or equal to this time are returned. In ISO 8601 format, e.g. 2025-01-01T10:20:00Z. (optional) * @param string|null $sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). (optional) * * @throws ApiException on non-2xx response * @throws InvalidArgumentException|GuzzleException * @return array of \Pipedrive\versions\v1\Model\GetLeadsResponse, HTTP status code, HTTP response headers (array of strings) */ - public function getLeadsWithHttpInfo($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $sort = null) + public function getLeadsWithHttpInfo($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $updated_since = null, $sort = null) { - $request = $this->getLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort); + $request = $this->getLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $updated_since, $sort); try { $options = $this->createHttpClientOption(); @@ -1757,7 +1759,7 @@ public function getLeadsWithHttpInfo($limit = null, $start = null, $owner_id = n } catch (RequestException $e) { if ($e->getCode() === 401 && $this->config->isRefreshPossible()) { $this->config->refreshToken(); - $request = $this->getLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort); + $request = $this->getLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $updated_since, $sort); $response = $this->client->send($request, $options); } else { throw new ApiException( @@ -1847,14 +1849,15 @@ public function getLeadsWithHttpInfo($limit = null, $start = null, $owner_id = n * @param int|null $person_id If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. (optional) * @param int|null $organization_id If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. (optional) * @param int|null $filter_id The ID of the filter to use (optional) + * @param string|null $updated_since If set, only leads with an `update_time` later than or equal to this time are returned. In ISO 8601 format, e.g. 2025-01-01T10:20:00Z. (optional) * @param string|null $sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface */ - public function getLeadsAsync($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $sort = null): PromiseInterface + public function getLeadsAsync($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $updated_since = null, $sort = null): PromiseInterface { - return $this->getLeadsAsyncWithHttpInfo($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort) + return $this->getLeadsAsyncWithHttpInfo($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $updated_since, $sort) ->then( function ($response) { return $response[0]; @@ -1873,15 +1876,16 @@ function ($response) { * @param int|null $person_id If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. (optional) * @param int|null $organization_id If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. (optional) * @param int|null $filter_id The ID of the filter to use (optional) + * @param string|null $updated_since If set, only leads with an `update_time` later than or equal to this time are returned. In ISO 8601 format, e.g. 2025-01-01T10:20:00Z. (optional) * @param string|null $sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface */ - public function getLeadsAsyncWithHttpInfo($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $sort = null): PromiseInterface + public function getLeadsAsyncWithHttpInfo($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $updated_since = null, $sort = null): PromiseInterface { $returnType = '\Pipedrive\versions\v1\Model\GetLeadsResponse'; - $request = $this->getLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort); + $request = $this->getLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $updated_since, $sort); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -1926,12 +1930,13 @@ function ($exception) { * @param int|null $person_id If supplied, only leads matching the given person will be returned. However, `filter_id` takes precedence over `person_id` when supplied. (optional) * @param int|null $organization_id If supplied, only leads matching the given organization will be returned. However, `filter_id` takes precedence over `organization_id` when supplied. (optional) * @param int|null $filter_id The ID of the filter to use (optional) + * @param string|null $updated_since If set, only leads with an `update_time` later than or equal to this time are returned. In ISO 8601 format, e.g. 2025-01-01T10:20:00Z. (optional) * @param string|null $sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). (optional) * * @throws InvalidArgumentException|OAuthProviderException * @return Request */ - public function getLeadsRequest($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $sort = null): Request + public function getLeadsRequest($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $updated_since = null, $sort = null): Request { $resourcePath = '/leads'; @@ -1991,6 +1996,14 @@ public function getLeadsRequest($limit = null, $start = null, $owner_id = null, } // query params /* @phpstan-ignore-next-line */ + if (is_array($updated_since)) { + $updated_since = ObjectSerializer::serializeCollection($updated_since, '', true); + } + if ($updated_since !== null) { + $queryParams['updated_since'] = $updated_since; + } + // query params + /* @phpstan-ignore-next-line */ if (is_array($sort)) { $sort = ObjectSerializer::serializeCollection($sort, '', true); } diff --git a/lib/versions/v1/Api/NotesApi.php b/lib/versions/v1/Api/NotesApi.php index 5bcece2..7deeed6 100644 --- a/lib/versions/v1/Api/NotesApi.php +++ b/lib/versions/v1/Api/NotesApi.php @@ -2278,6 +2278,7 @@ public function getNoteCommentsRequest($id, $start = 0, $limit = null): Request * @param string|null $sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`. (optional) * @param \DateTime|null $start_date The date in format of YYYY-MM-DD from which notes to fetch (optional) * @param \DateTime|null $end_date The date in format of YYYY-MM-DD until which notes to fetch to (optional) + * @param \DateTime|null $updated_since If set, only notes with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_lead_flag If set, the results are filtered by note to lead pinning state (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_deal_flag If set, the results are filtered by note to deal pinning state (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_organization_flag If set, the results are filtered by note to organization pinning state (optional) @@ -2288,9 +2289,9 @@ public function getNoteCommentsRequest($id, $start = 0, $limit = null): Request * @throws InvalidArgumentException|GuzzleException * @return \Pipedrive\versions\v1\Model\GetNotes */ - public function getNotes($user_id = null, $lead_id = null, $deal_id = null, $person_id = null, $org_id = null, $project_id = null, $start = 0, $limit = null, $sort = null, $start_date = null, $end_date = null, $pinned_to_lead_flag = null, $pinned_to_deal_flag = null, $pinned_to_organization_flag = null, $pinned_to_person_flag = null, $pinned_to_project_flag = null) + public function getNotes($user_id = null, $lead_id = null, $deal_id = null, $person_id = null, $org_id = null, $project_id = null, $start = 0, $limit = null, $sort = null, $start_date = null, $end_date = null, $updated_since = null, $pinned_to_lead_flag = null, $pinned_to_deal_flag = null, $pinned_to_organization_flag = null, $pinned_to_person_flag = null, $pinned_to_project_flag = null) { - list($response) = $this->getNotesWithHttpInfo($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag); + list($response) = $this->getNotesWithHttpInfo($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $updated_since, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag); return $response; } @@ -2310,6 +2311,7 @@ public function getNotes($user_id = null, $lead_id = null, $deal_id = null, $per * @param string|null $sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`. (optional) * @param \DateTime|null $start_date The date in format of YYYY-MM-DD from which notes to fetch (optional) * @param \DateTime|null $end_date The date in format of YYYY-MM-DD until which notes to fetch to (optional) + * @param \DateTime|null $updated_since If set, only notes with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_lead_flag If set, the results are filtered by note to lead pinning state (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_deal_flag If set, the results are filtered by note to deal pinning state (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_organization_flag If set, the results are filtered by note to organization pinning state (optional) @@ -2320,9 +2322,9 @@ public function getNotes($user_id = null, $lead_id = null, $deal_id = null, $per * @throws InvalidArgumentException|GuzzleException * @return array of \Pipedrive\versions\v1\Model\GetNotes, HTTP status code, HTTP response headers (array of strings) */ - public function getNotesWithHttpInfo($user_id = null, $lead_id = null, $deal_id = null, $person_id = null, $org_id = null, $project_id = null, $start = 0, $limit = null, $sort = null, $start_date = null, $end_date = null, $pinned_to_lead_flag = null, $pinned_to_deal_flag = null, $pinned_to_organization_flag = null, $pinned_to_person_flag = null, $pinned_to_project_flag = null) + public function getNotesWithHttpInfo($user_id = null, $lead_id = null, $deal_id = null, $person_id = null, $org_id = null, $project_id = null, $start = 0, $limit = null, $sort = null, $start_date = null, $end_date = null, $updated_since = null, $pinned_to_lead_flag = null, $pinned_to_deal_flag = null, $pinned_to_organization_flag = null, $pinned_to_person_flag = null, $pinned_to_project_flag = null) { - $request = $this->getNotesRequest($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag); + $request = $this->getNotesRequest($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $updated_since, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag); try { $options = $this->createHttpClientOption(); @@ -2331,7 +2333,7 @@ public function getNotesWithHttpInfo($user_id = null, $lead_id = null, $deal_id } catch (RequestException $e) { if ($e->getCode() === 401 && $this->config->isRefreshPossible()) { $this->config->refreshToken(); - $request = $this->getNotesRequest($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag); + $request = $this->getNotesRequest($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $updated_since, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag); $response = $this->client->send($request, $options); } else { throw new ApiException( @@ -2426,6 +2428,7 @@ public function getNotesWithHttpInfo($user_id = null, $lead_id = null, $deal_id * @param string|null $sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`. (optional) * @param \DateTime|null $start_date The date in format of YYYY-MM-DD from which notes to fetch (optional) * @param \DateTime|null $end_date The date in format of YYYY-MM-DD until which notes to fetch to (optional) + * @param \DateTime|null $updated_since If set, only notes with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_lead_flag If set, the results are filtered by note to lead pinning state (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_deal_flag If set, the results are filtered by note to deal pinning state (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_organization_flag If set, the results are filtered by note to organization pinning state (optional) @@ -2435,9 +2438,9 @@ public function getNotesWithHttpInfo($user_id = null, $lead_id = null, $deal_id * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface */ - public function getNotesAsync($user_id = null, $lead_id = null, $deal_id = null, $person_id = null, $org_id = null, $project_id = null, $start = 0, $limit = null, $sort = null, $start_date = null, $end_date = null, $pinned_to_lead_flag = null, $pinned_to_deal_flag = null, $pinned_to_organization_flag = null, $pinned_to_person_flag = null, $pinned_to_project_flag = null): PromiseInterface + public function getNotesAsync($user_id = null, $lead_id = null, $deal_id = null, $person_id = null, $org_id = null, $project_id = null, $start = 0, $limit = null, $sort = null, $start_date = null, $end_date = null, $updated_since = null, $pinned_to_lead_flag = null, $pinned_to_deal_flag = null, $pinned_to_organization_flag = null, $pinned_to_person_flag = null, $pinned_to_project_flag = null): PromiseInterface { - return $this->getNotesAsyncWithHttpInfo($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag) + return $this->getNotesAsyncWithHttpInfo($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $updated_since, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag) ->then( function ($response) { return $response[0]; @@ -2461,6 +2464,7 @@ function ($response) { * @param string|null $sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`. (optional) * @param \DateTime|null $start_date The date in format of YYYY-MM-DD from which notes to fetch (optional) * @param \DateTime|null $end_date The date in format of YYYY-MM-DD until which notes to fetch to (optional) + * @param \DateTime|null $updated_since If set, only notes with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_lead_flag If set, the results are filtered by note to lead pinning state (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_deal_flag If set, the results are filtered by note to deal pinning state (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_organization_flag If set, the results are filtered by note to organization pinning state (optional) @@ -2470,10 +2474,10 @@ function ($response) { * @throws InvalidArgumentException|OAuthProviderException * @return PromiseInterface */ - public function getNotesAsyncWithHttpInfo($user_id = null, $lead_id = null, $deal_id = null, $person_id = null, $org_id = null, $project_id = null, $start = 0, $limit = null, $sort = null, $start_date = null, $end_date = null, $pinned_to_lead_flag = null, $pinned_to_deal_flag = null, $pinned_to_organization_flag = null, $pinned_to_person_flag = null, $pinned_to_project_flag = null): PromiseInterface + public function getNotesAsyncWithHttpInfo($user_id = null, $lead_id = null, $deal_id = null, $person_id = null, $org_id = null, $project_id = null, $start = 0, $limit = null, $sort = null, $start_date = null, $end_date = null, $updated_since = null, $pinned_to_lead_flag = null, $pinned_to_deal_flag = null, $pinned_to_organization_flag = null, $pinned_to_person_flag = null, $pinned_to_project_flag = null): PromiseInterface { $returnType = '\Pipedrive\versions\v1\Model\GetNotes'; - $request = $this->getNotesRequest($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag); + $request = $this->getNotesRequest($user_id, $lead_id, $deal_id, $person_id, $org_id, $project_id, $start, $limit, $sort, $start_date, $end_date, $updated_since, $pinned_to_lead_flag, $pinned_to_deal_flag, $pinned_to_organization_flag, $pinned_to_person_flag, $pinned_to_project_flag); return $this->client ->sendAsync($request, $this->createHttpClientOption()) @@ -2523,6 +2527,7 @@ function ($exception) { * @param string|null $sort The field names and sorting mode separated by a comma (`field_name_1 ASC`, `field_name_2 DESC`). Only first-level field keys are supported (no nested keys). Supported fields: `id`, `user_id`, `deal_id`, `person_id`, `org_id`, `content`, `add_time`, `update_time`. (optional) * @param \DateTime|null $start_date The date in format of YYYY-MM-DD from which notes to fetch (optional) * @param \DateTime|null $end_date The date in format of YYYY-MM-DD until which notes to fetch to (optional) + * @param \DateTime|null $updated_since If set, only notes with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_lead_flag If set, the results are filtered by note to lead pinning state (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_deal_flag If set, the results are filtered by note to deal pinning state (optional) * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $pinned_to_organization_flag If set, the results are filtered by note to organization pinning state (optional) @@ -2532,7 +2537,7 @@ function ($exception) { * @throws InvalidArgumentException|OAuthProviderException * @return Request */ - public function getNotesRequest($user_id = null, $lead_id = null, $deal_id = null, $person_id = null, $org_id = null, $project_id = null, $start = 0, $limit = null, $sort = null, $start_date = null, $end_date = null, $pinned_to_lead_flag = null, $pinned_to_deal_flag = null, $pinned_to_organization_flag = null, $pinned_to_person_flag = null, $pinned_to_project_flag = null): Request + public function getNotesRequest($user_id = null, $lead_id = null, $deal_id = null, $person_id = null, $org_id = null, $project_id = null, $start = 0, $limit = null, $sort = null, $start_date = null, $end_date = null, $updated_since = null, $pinned_to_lead_flag = null, $pinned_to_deal_flag = null, $pinned_to_organization_flag = null, $pinned_to_person_flag = null, $pinned_to_project_flag = null): Request { $resourcePath = '/notes'; @@ -2632,6 +2637,14 @@ public function getNotesRequest($user_id = null, $lead_id = null, $deal_id = nul } // query params /* @phpstan-ignore-next-line */ + if (is_array($updated_since)) { + $updated_since = ObjectSerializer::serializeCollection($updated_since, '', true); + } + if ($updated_since !== null) { + $queryParams['updated_since'] = $updated_since; + } + // query params + /* @phpstan-ignore-next-line */ if (is_array($pinned_to_lead_flag)) { $pinned_to_lead_flag = ObjectSerializer::serializeCollection($pinned_to_lead_flag, '', true); }