diff --git a/CHANGELOG.md b/CHANGELOG.md
index a0e2581..d492976 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,10 @@ 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 option to use `sort_by=due_date` sorting for `GET /api/v2/activities`
+- Added option to use `done=true/false` quick filter for `GET /api/v2/activities`
+### Changed
[9.0.0](https://github.com/pipedrive/client-php/compare/8.1.5...9.0.0) (2025-03-31)
diff --git a/docs/versions/v1/Api/ActivitiesApi.md b/docs/versions/v1/Api/ActivitiesApi.md
index bb4ab33..e1357fd 100644
--- a/docs/versions/v1/Api/ActivitiesApi.md
+++ b/docs/versions/v1/Api/ActivitiesApi.md
@@ -8,7 +8,7 @@ Method | HTTP request | Description
[**deleteActivities()**](ActivitiesApi.md#deleteActivities) | **DELETE** /activities | Delete multiple activities in bulk
[**deleteActivity()**](ActivitiesApi.md#deleteActivity) | **DELETE** /activities/{id} | Delete an activity
[**getActivities()**](ActivitiesApi.md#getActivities) | **GET** /activities | Get all activities assigned to a particular user
-[**getActivitiesCollection()**](ActivitiesApi.md#getActivitiesCollection) | **GET** /activities/collection | Get all activities (BETA)
+[**getActivitiesCollection()**](ActivitiesApi.md#getActivitiesCollection) | **GET** /activities/collection | Get all activities collection
[**getActivity()**](ActivitiesApi.md#getActivity) | **GET** /activities/{id} | Get details of an activity
[**updateActivity()**](ActivitiesApi.md#updateActivity) | **PUT** /activities/{id} | Update an activity
@@ -86,7 +86,7 @@ deleteActivities($ids): \Pipedrive\versions\v1\Model\DeleteActivitiesResponse
Delete multiple activities in bulk
-Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
+Marks multiple activities as deleted. After 30 days, the activities will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/activities/{id} instead.
### Example
@@ -293,9 +293,9 @@ Name | Type | Description | Notes
getActivitiesCollection($cursor, $limit, $since, $until, $user_id, $done, $type): \Pipedrive\versions\v1\Model\GetActivitiesCollectionResponse
```
-Get all activities (BETA)
+Get all activities collection
-Returns all activities. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+Returns all activities. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/activities instead.
### Example
diff --git a/docs/versions/v1/Api/DealsApi.md b/docs/versions/v1/Api/DealsApi.md
index 005b858..88b8a47 100644
--- a/docs/versions/v1/Api/DealsApi.md
+++ b/docs/versions/v1/Api/DealsApi.md
@@ -14,6 +14,9 @@ Method | HTTP request | Description
[**deleteDealProduct()**](DealsApi.md#deleteDealProduct) | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal
[**deleteDeals()**](DealsApi.md#deleteDeals) | **DELETE** /deals | Delete multiple deals in bulk
[**duplicateDeal()**](DealsApi.md#duplicateDeal) | **POST** /deals/{id}/duplicate | Duplicate deal
+[**getArchivedDeals()**](DealsApi.md#getArchivedDeals) | **GET** /deals/archived | Get all archived deals
+[**getArchivedDealsSummary()**](DealsApi.md#getArchivedDealsSummary) | **GET** /deals/summary/archived | Get archived deals summary
+[**getArchivedDealsTimeline()**](DealsApi.md#getArchivedDealsTimeline) | **GET** /deals/timeline/archived | Get archived deals timeline
[**getDeal()**](DealsApi.md#getDeal) | **GET** /deals/{id} | Get details of a deal
[**getDealActivities()**](DealsApi.md#getDealActivities) | **GET** /deals/{id}/activities | List activities associated with a deal
[**getDealChangelog()**](DealsApi.md#getDealChangelog) | **GET** /deals/{id}/changelog | List updates about deal field values
@@ -27,7 +30,7 @@ Method | HTTP request | Description
[**getDealUpdates()**](DealsApi.md#getDealUpdates) | **GET** /deals/{id}/flow | List updates about a deal
[**getDealUsers()**](DealsApi.md#getDealUsers) | **GET** /deals/{id}/permittedUsers | List permitted users
[**getDeals()**](DealsApi.md#getDeals) | **GET** /deals | Get all deals
-[**getDealsCollection()**](DealsApi.md#getDealsCollection) | **GET** /deals/collection | Get all deals (BETA)
+[**getDealsCollection()**](DealsApi.md#getDealsCollection) | **GET** /deals/collection | Get all deals collection
[**getDealsSummary()**](DealsApi.md#getDealsSummary) | **GET** /deals/summary | Get deals summary
[**getDealsTimeline()**](DealsApi.md#getDealsTimeline) | **GET** /deals/timeline | Get deals timeline
[**mergeDeals()**](DealsApi.md#mergeDeals) | **PUT** /deals/{id}/merge | Merge two deals
@@ -576,7 +579,7 @@ deleteDeals($ids): \Pipedrive\versions\v1\Model\DeleteMultipleDeals
Delete multiple deals in bulk
-Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
+Marks multiple deals as deleted. After 30 days, the deals will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/deals/{id} instead.
### Example
@@ -698,6 +701,247 @@ Name | Type | Description | Notes
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
+## `getArchivedDeals()`
+
+```php
+getArchivedDeals($user_id, $filter_id, $person_id, $org_id, $product_id, $pipeline_id, $stage_id, $status, $start, $limit, $sort, $owned_by_you): \Pipedrive\versions\v1\Model\GetDeals
+```
+
+Get all archived deals
+
+Returns all archived deals.
+
+### Example
+
+```php
+setApiKey('api_token', 'YOUR_API_KEY');
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('api_token', 'Bearer');
+
+// Configure OAuth2 access token for authorization: oauth2
+$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
+
+
+$apiInstance = new Pipedrive\versions\v1\Api\DealsApi(
+ // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
+ // This is optional, `GuzzleHttp\Client` will be used as default.
+ new GuzzleHttp\Client(),
+ $config
+);
+$user_id = 56; // int | If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied.
+$filter_id = 56; // int | The ID of the filter to use
+$person_id = 56; // int | If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored.
+$org_id = 56; // int | If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored.
+$product_id = 56; // int | If supplied, only deals linked to the specified product are returned. If filter_id is provided, this is ignored.
+$pipeline_id = 56; // int | If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored.
+$stage_id = 56; // int | If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored.
+$status = 'all_not_deleted'; // string | Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included.
+$start = 0; // int | Pagination start
+$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).
+$owned_by_you = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBoolean(); // \Pipedrive\versions\v1\Model\NumberBoolean | When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied.
+
+try {
+ $result = $apiInstance->getArchivedDeals($user_id, $filter_id, $person_id, $org_id, $product_id, $pipeline_id, $stage_id, $status, $start, $limit, $sort, $owned_by_you);
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling DealsApi->getArchivedDeals: ', $e->getMessage(), PHP_EOL;
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **user_id** | **int**| If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. | [optional]
+ **filter_id** | **int**| The ID of the filter to use | [optional]
+ **person_id** | **int**| If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. | [optional]
+ **org_id** | **int**| If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. | [optional]
+ **product_id** | **int**| If supplied, only deals linked to the specified product are returned. If filter_id is provided, this is ignored. | [optional]
+ **pipeline_id** | **int**| If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. | [optional]
+ **stage_id** | **int**| If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. | [optional]
+ **status** | **string**| Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. | [optional] [default to 'all_not_deleted']
+ **start** | **int**| Pagination start | [optional] [default to 0]
+ **limit** | **int**| Items shown per page | [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]
+ **owned_by_you** | [**\Pipedrive\versions\v1\Model\NumberBoolean**](../Model/.md)| When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. | [optional]
+
+### Return type
+
+[**\Pipedrive\versions\v1\Model\GetDeals**](../Model/GetDeals.md)
+
+### Authorization
+
+[api_key](../README.md#api_key), [oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: `application/json`
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+## `getArchivedDealsSummary()`
+
+```php
+getArchivedDealsSummary($status, $filter_id, $user_id, $pipeline_id, $stage_id): \Pipedrive\versions\v1\Model\GetDealsSummary
+```
+
+Get archived deals summary
+
+Returns a summary of all archived deals.
+
+### Example
+
+```php
+setApiKey('api_token', 'YOUR_API_KEY');
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('api_token', 'Bearer');
+
+// Configure OAuth2 access token for authorization: oauth2
+$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
+
+
+$apiInstance = new Pipedrive\versions\v1\Api\DealsApi(
+ // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
+ // This is optional, `GuzzleHttp\Client` will be used as default.
+ new GuzzleHttp\Client(),
+ $config
+);
+$status = 'status_example'; // string | Only fetch deals with a specific status. open = Open, won = Won, lost = Lost.
+$filter_id = 56; // int | user_id
will not be considered. Only deals matching the given filter will be returned.
+$user_id = 56; // int | Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`.
+$pipeline_id = 56; // int | Only deals within the given pipeline will be returned
+$stage_id = 56; // int | Only deals within the given stage will be returned
+
+try {
+ $result = $apiInstance->getArchivedDealsSummary($status, $filter_id, $user_id, $pipeline_id, $stage_id);
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling DealsApi->getArchivedDealsSummary: ', $e->getMessage(), PHP_EOL;
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **status** | **string**| Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. | [optional]
+ **filter_id** | **int**| <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. | [optional]
+ **user_id** | **int**| Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. | [optional]
+ **pipeline_id** | **int**| Only deals within the given pipeline will be returned | [optional]
+ **stage_id** | **int**| Only deals within the given stage will be returned | [optional]
+
+### Return type
+
+[**\Pipedrive\versions\v1\Model\GetDealsSummary**](../Model/GetDealsSummary.md)
+
+### Authorization
+
+[api_key](../README.md#api_key), [oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: `application/json`
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
+## `getArchivedDealsTimeline()`
+
+```php
+getArchivedDealsTimeline($start_date, $interval, $amount, $field_key, $user_id, $pipeline_id, $filter_id, $exclude_deals, $totals_convert_currency): \Pipedrive\versions\v1\Model\GetDealsTimeline
+```
+
+Get archived deals timeline
+
+Returns archived open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`.
+
+### Example
+
+```php
+setApiKey('api_token', 'YOUR_API_KEY');
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('api_token', 'Bearer');
+
+// Configure OAuth2 access token for authorization: oauth2
+$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
+
+
+$apiInstance = new Pipedrive\versions\v1\Api\DealsApi(
+ // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
+ // This is optional, `GuzzleHttp\Client` will be used as default.
+ new GuzzleHttp\Client(),
+ $config
+);
+$start_date = new \DateTime("2013-10-20T19:20:30+01:00"); // \DateTime | The date when the first interval starts. Format: YYYY-MM-DD.
+$interval = 'interval_example'; // string | The type of the interval
Value | Description |
---|
`day` | Day |
`week` | A full week (7 days) starting from `start_date` |
`month` | A full month (depending on the number of days in given month) starting from `start_date` |
`quarter` | A full quarter (3 months) starting from `start_date` |
+$amount = 56; // int | The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months).
+$field_key = 'field_key_example'; // string | The date field key which deals will be retrieved from
+$user_id = 56; // int | If supplied, only deals matching the given user will be returned
+$pipeline_id = 56; // int | If supplied, only deals matching the given pipeline will be returned
+$filter_id = 56; // int | If supplied, only deals matching the given filter will be returned
+$exclude_deals = new \Pipedrive\versions\v1\Model\\Pipedrive\versions\v1\Model\NumberBoolean(); // \Pipedrive\versions\v1\Model\NumberBoolean | Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned.
+$totals_convert_currency = 'totals_convert_currency_example'; // string | The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user's default currency is used.
+
+try {
+ $result = $apiInstance->getArchivedDealsTimeline($start_date, $interval, $amount, $field_key, $user_id, $pipeline_id, $filter_id, $exclude_deals, $totals_convert_currency);
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling DealsApi->getArchivedDealsTimeline: ', $e->getMessage(), PHP_EOL;
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **start_date** | **\DateTime**| The date when the first interval starts. Format: YYYY-MM-DD. |
+ **interval** | **string**| The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> |
+ **amount** | **int**| The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months). |
+ **field_key** | **string**| The date field key which deals will be retrieved from |
+ **user_id** | **int**| If supplied, only deals matching the given user will be returned | [optional]
+ **pipeline_id** | **int**| If supplied, only deals matching the given pipeline will be returned | [optional]
+ **filter_id** | **int**| If supplied, only deals matching the given filter will be returned | [optional]
+ **exclude_deals** | [**\Pipedrive\versions\v1\Model\NumberBoolean**](../Model/.md)| Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned. | [optional]
+ **totals_convert_currency** | **string**| The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user's default currency is used. | [optional]
+
+### Return type
+
+[**\Pipedrive\versions\v1\Model\GetDealsTimeline**](../Model/GetDealsTimeline.md)
+
+### Authorization
+
+[api_key](../README.md#api_key), [oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: `application/json`
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
## `getDeal()`
```php
@@ -771,7 +1015,7 @@ getDealActivities($id, $start, $limit, $done, $exclude): \Pipedrive\versions\v1\
List activities associated with a deal
-Lists activities associated with a deal.
+Lists activities associated with a deal.
This endpoint has been deprecated. Please use GET /api/v2/activities?deal_id={id} instead.
### Example
@@ -1256,7 +1500,7 @@ getDealPersons($id, $start, $limit): \Pipedrive\versions\v1\Model\ListPersonsRes
List all persons associated with a deal
-Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
+Lists all persons associated with a deal, regardless of whether the person is the primary contact of the deal, or added as a participant.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?deal_id={id} instead.
### Example
@@ -1534,7 +1778,7 @@ getDeals($user_id, $filter_id, $stage_id, $status, $start, $limit, $sort, $owned
Get all deals
-Returns all deals. For more information, see the tutorial for getting all deals.
+Returns all not archived deals. For more information, see the tutorial for getting all deals.
### Example
@@ -1611,9 +1855,9 @@ Name | Type | Description | Notes
getDealsCollection($cursor, $limit, $since, $until, $user_id, $stage_id, $status): \Pipedrive\versions\v1\Model\GetDealsCollection
```
-Get all deals (BETA)
+Get all deals collection
-Returns all deals. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+Returns all deals. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/deals instead.
### Example
@@ -1690,7 +1934,7 @@ getDealsSummary($status, $filter_id, $user_id, $pipeline_id, $stage_id): \Pipedr
Get deals summary
-Returns a summary of all the deals.
+Returns a summary of all not archived deals.
### Example
@@ -1763,7 +2007,7 @@ getDealsTimeline($start_date, $interval, $amount, $field_key, $user_id, $pipelin
Get deals timeline
-Returns open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`.
+Returns not archived open and won deals, grouped by a defined interval of time set in a date-type dealField (`field_key`) — e.g. when month is the chosen interval, and 3 months are asked starting from January 1st, 2012, deals are returned grouped into 3 groups — January, February and March — based on the value of the given `field_key`.
### Example
diff --git a/docs/versions/v1/Api/LeadsApi.md b/docs/versions/v1/Api/LeadsApi.md
index bab8819..39d6181 100644
--- a/docs/versions/v1/Api/LeadsApi.md
+++ b/docs/versions/v1/Api/LeadsApi.md
@@ -6,6 +6,7 @@ Method | HTTP request | Description
------------- | ------------- | -------------
[**addLead()**](LeadsApi.md#addLead) | **POST** /leads | Add a lead
[**deleteLead()**](LeadsApi.md#deleteLead) | **DELETE** /leads/{id} | Delete a lead
+[**getArchivedLeads()**](LeadsApi.md#getArchivedLeads) | **GET** /leads/archived | Get all archived leads
[**getLead()**](LeadsApi.md#getLead) | **GET** /leads/{id} | Get one lead
[**getLeadUsers()**](LeadsApi.md#getLeadUsers) | **GET** /leads/{id}/permittedUsers | List permitted users
[**getLeads()**](LeadsApi.md#getLeads) | **GET** /leads | Get all leads
@@ -143,6 +144,83 @@ Name | Type | Description | Notes
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
+## `getArchivedLeads()`
+
+```php
+getArchivedLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort): \Pipedrive\versions\v1\Model\GetLeadsResponse
+```
+
+Get all archived leads
+
+Returns multiple archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals.
+
+### Example
+
+```php
+setApiKey('api_token', 'YOUR_API_KEY');
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+// $config = (new Pipedrive\versions\v1\Configuration())->setApiKeyPrefix('api_token', 'Bearer');
+
+// Configure OAuth2 access token for authorization: oauth2
+$config = (new Pipedrive\versions\v1\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
+
+
+$apiInstance = new Pipedrive\versions\v1\Api\LeadsApi(
+ // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
+ // This is optional, `GuzzleHttp\Client` will be used as default.
+ new GuzzleHttp\Client(),
+ $config
+);
+$limit = 100; // int | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
+$start = 0; // int | For pagination, the position that represents the first result for the page
+$owner_id = 1; // int | If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied.
+$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
+$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->getArchivedLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling LeadsApi->getArchivedLeads: ', $e->getMessage(), PHP_EOL;
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **limit** | **int**| For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. | [optional]
+ **start** | **int**| For pagination, the position that represents the first result for the page | [optional]
+ **owner_id** | **int**| If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. | [optional]
+ **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]
+ **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
+
+[**\Pipedrive\versions\v1\Model\GetLeadsResponse**](../Model/GetLeadsResponse.md)
+
+### Authorization
+
+[api_key](../README.md#api_key), [oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: `application/json`
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
## `getLead()`
```php
@@ -276,12 +354,12 @@ Name | Type | Description | Notes
## `getLeads()`
```php
-getLeads($limit, $start, $archived_status, $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, $sort): \Pipedrive\versions\v1\Model\GetLeadsResponse
```
Get all leads
-Returns multiple leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals.
+Returns multiple not archived leads. Leads are sorted by the time they were created, from oldest to newest. Pagination can be controlled using `limit` and `start` query parameters. If a lead contains custom fields, the fields' values will be included in the response in the same format as with the `Deals` endpoints. If a custom field's value hasn't been set for the lead, it won't appear in the response. Please note that leads do not have a separate set of custom fields, instead they inherit the custom fields' structure from deals.
### Example
@@ -307,7 +385,6 @@ $apiInstance = new Pipedrive\versions\v1\Api\LeadsApi(
);
$limit = 100; // int | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned.
$start = 0; // int | For pagination, the position that represents the first result for the page
-$archived_status = 'archived_status_example'; // string | Filtering based on the archived status of a lead. If not provided, `All` is used.
$owner_id = 1; // int | If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied.
$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.
@@ -315,7 +392,7 @@ $filter_id = 1; // int | The ID of the filter to use
$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, $archived_status, $owner_id, $person_id, $organization_id, $filter_id, $sort);
+ $result = $apiInstance->getLeads($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling LeadsApi->getLeads: ', $e->getMessage(), PHP_EOL;
@@ -328,7 +405,6 @@ Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**limit** | **int**| For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. | [optional]
**start** | **int**| For pagination, the position that represents the first result for the page | [optional]
- **archived_status** | **string**| Filtering based on the archived status of a lead. If not provided, `All` is used. | [optional]
**owner_id** | **int**| If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. | [optional]
**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]
diff --git a/docs/versions/v1/Api/OrganizationsApi.md b/docs/versions/v1/Api/OrganizationsApi.md
index 97b1683..faf967c 100644
--- a/docs/versions/v1/Api/OrganizationsApi.md
+++ b/docs/versions/v1/Api/OrganizationsApi.md
@@ -20,7 +20,7 @@ Method | HTTP request | Description
[**getOrganizationUpdates()**](OrganizationsApi.md#getOrganizationUpdates) | **GET** /organizations/{id}/flow | List updates about an organization
[**getOrganizationUsers()**](OrganizationsApi.md#getOrganizationUsers) | **GET** /organizations/{id}/permittedUsers | List permitted users
[**getOrganizations()**](OrganizationsApi.md#getOrganizations) | **GET** /organizations | Get all organizations
-[**getOrganizationsCollection()**](OrganizationsApi.md#getOrganizationsCollection) | **GET** /organizations/collection | Get all organizations (BETA)
+[**getOrganizationsCollection()**](OrganizationsApi.md#getOrganizationsCollection) | **GET** /organizations/collection | Get all organizations collection
[**mergeOrganizations()**](OrganizationsApi.md#mergeOrganizations) | **PUT** /organizations/{id}/merge | Merge two organizations
[**searchOrganization()**](OrganizationsApi.md#searchOrganization) | **GET** /organizations/search | Search organizations
[**updateOrganization()**](OrganizationsApi.md#updateOrganization) | **PUT** /organizations/{id} | Update an organization
@@ -298,7 +298,7 @@ deleteOrganizations($ids): \Pipedrive\versions\v1\Model\OrganizationsDeleteRespo
Delete multiple organizations in bulk
-Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted.
+Marks multiple organizations as deleted. After 30 days, the organizations will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/organizations/{id} instead.
### Example
@@ -428,7 +428,7 @@ getOrganizationActivities($id, $start, $limit, $done, $exclude): \Pipedrive\vers
List activities associated with an organization
-Lists activities associated with an organization.
+Lists activities associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/activities?org_id={id} instead.
### Example
@@ -570,7 +570,7 @@ getOrganizationDeals($id, $start, $limit, $status, $sort, $only_primary_associat
List deals associated with an organization
-Lists deals associated with an organization.
+Lists deals associated with an organization.
This endpoint has been deprecated. Please use GET /api/v2/deals?org_id={id} instead.
### Example
@@ -850,7 +850,7 @@ getOrganizationPersons($id, $start, $limit): \Pipedrive\versions\v1\Model\ListPe
List persons of an organization
-Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
+Lists persons associated with an organization.
If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also return the `data.marketing_status` field.
This endpoint has been deprecated. Please use GET /api/v2/persons?org_id={id} instead.
### Example
@@ -1130,9 +1130,9 @@ Name | Type | Description | Notes
getOrganizationsCollection($cursor, $limit, $since, $until, $owner_id, $first_char): \Pipedrive\versions\v1\Model\InlineResponse200
```
-Get all organizations (BETA)
+Get all organizations collection
-Returns all organizations. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+Returns all organizations. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/organizations instead.
### Example
diff --git a/docs/versions/v1/Api/PersonsApi.md b/docs/versions/v1/Api/PersonsApi.md
index 8b9a0f8..7a4d1da 100644
--- a/docs/versions/v1/Api/PersonsApi.md
+++ b/docs/versions/v1/Api/PersonsApi.md
@@ -22,7 +22,7 @@ Method | HTTP request | Description
[**getPersonUpdates()**](PersonsApi.md#getPersonUpdates) | **GET** /persons/{id}/flow | List updates about a person
[**getPersonUsers()**](PersonsApi.md#getPersonUsers) | **GET** /persons/{id}/permittedUsers | List permitted users
[**getPersons()**](PersonsApi.md#getPersons) | **GET** /persons | Get all persons
-[**getPersonsCollection()**](PersonsApi.md#getPersonsCollection) | **GET** /persons/collection | Get all persons (BETA)
+[**getPersonsCollection()**](PersonsApi.md#getPersonsCollection) | **GET** /persons/collection | Get all persons collection
[**mergePersons()**](PersonsApi.md#mergePersons) | **PUT** /persons/{id}/merge | Merge two persons
[**searchPersons()**](PersonsApi.md#searchPersons) | **GET** /persons/search | Search persons
[**updatePerson()**](PersonsApi.md#updatePerson) | **PUT** /persons/{id} | Update a person
@@ -440,7 +440,7 @@ deletePersons($ids): \Pipedrive\versions\v1\Model\DeletePersonsInBulkResponse
Delete multiple persons in bulk
-Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted.
+Marks multiple persons as deleted. After 30 days, the persons will be permanently deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/persons/{id} instead.
### Example
@@ -570,7 +570,7 @@ getPersonActivities($id, $start, $limit, $done, $exclude): \Pipedrive\versions\v
List activities associated with a person
-Lists activities associated with a person.
+Lists activities associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/activities?person_id={id} instead.
### Example
@@ -712,7 +712,7 @@ getPersonDeals($id, $start, $limit, $status, $sort): \Pipedrive\versions\v1\Mode
List deals associated with a person
-Lists deals associated with a person.
+Lists deals associated with a person.
This endpoint has been deprecated. Please use GET /api/v2/deals?person_id={id} instead.
### Example
@@ -1270,9 +1270,9 @@ Name | Type | Description | Notes
getPersonsCollection($cursor, $limit, $since, $until, $owner_id, $first_char): \Pipedrive\versions\v1\Model\InlineResponse2001
```
-Get all persons (BETA)
+Get all persons collection
-Returns all persons. This is a cursor-paginated endpoint that is currently in BETA. For more information, please refer to our documentation on pagination. Please note that only global admins (those with global permissions) can access these endpoints. Users with regular permissions will receive a 403 response. Read more about global permissions here.
+Returns all persons. Please note that only global admins (those with global permissions) can access this endpoint. Users with regular permissions will receive a 403 response. Read more about global permissions here.
This endpoint has been deprecated. Please use GET /api/v2/persons instead.
### Example
diff --git a/docs/versions/v1/Api/PipelinesApi.md b/docs/versions/v1/Api/PipelinesApi.md
index 901ac2d..c0f5e72 100644
--- a/docs/versions/v1/Api/PipelinesApi.md
+++ b/docs/versions/v1/Api/PipelinesApi.md
@@ -290,7 +290,7 @@ getPipelineDeals($id, $filter_id, $user_id, $everyone, $stage_id, $start, $limit
Get deals in a pipeline
-Lists deals in a specific pipeline across all its stages. If no parameters are provided open deals owned by the authorized user will be returned.
+Lists deals in a specific pipeline across all its stages. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?pipeline_id={id} instead.
### Example
diff --git a/docs/versions/v1/Api/StagesApi.md b/docs/versions/v1/Api/StagesApi.md
index c696a11..88b0807 100644
--- a/docs/versions/v1/Api/StagesApi.md
+++ b/docs/versions/v1/Api/StagesApi.md
@@ -151,7 +151,7 @@ deleteStages($ids): \Pipedrive\versions\v1\Model\DeleteStagesResponse
Delete multiple stages in bulk
-Marks multiple stages as deleted.
+Marks multiple stages as deleted.
This endpoint has been deprecated. Please use DELETE /api/v2/stages/{id} instead.
### Example
@@ -283,7 +283,7 @@ getStageDeals($id, $filter_id, $user_id, $everyone, $start, $limit): \Pipedrive\
Get deals in a stage
-Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned.
+Lists deals in a specific stage. If no parameters are provided open deals owned by the authorized user will be returned.
This endpoint has been deprecated. Please use GET /api/v2/deals?stage_id={id} instead.
### Example
diff --git a/docs/versions/v1/Model/DealSearchItemItem.md b/docs/versions/v1/Model/DealSearchItemItem.md
index 846adea..31189e7 100644
--- a/docs/versions/v1/Model/DealSearchItemItem.md
+++ b/docs/versions/v1/Model/DealSearchItemItem.md
@@ -17,5 +17,6 @@ Name | Type | Description | Notes
**organization** | [**\Pipedrive\versions\v1\Model\DealSearchItemItemOrganization**](DealSearchItemItemOrganization.md) | | [optional]
**custom_fields** | **string[]** | Custom fields | [optional]
**notes** | **string[]** | An array of notes | [optional]
+**is_archived** | **bool** | A flag indicating whether the deal is archived or not | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/versions/v1/README.md b/docs/versions/v1/README.md
index b1e94c8..2a84e1e 100644
--- a/docs/versions/v1/README.md
+++ b/docs/versions/v1/README.md
@@ -269,7 +269,7 @@ Class | Method | HTTP request | Description
*ActivitiesApi* | [**deleteActivities**](Api/ActivitiesApi.md#deleteactivities) | **DELETE** /activities | Delete multiple activities in bulk
*ActivitiesApi* | [**deleteActivity**](Api/ActivitiesApi.md#deleteactivity) | **DELETE** /activities/{id} | Delete an activity
*ActivitiesApi* | [**getActivities**](Api/ActivitiesApi.md#getactivities) | **GET** /activities | Get all activities assigned to a particular user
-*ActivitiesApi* | [**getActivitiesCollection**](Api/ActivitiesApi.md#getactivitiescollection) | **GET** /activities/collection | Get all activities (BETA)
+*ActivitiesApi* | [**getActivitiesCollection**](Api/ActivitiesApi.md#getactivitiescollection) | **GET** /activities/collection | Get all activities collection
*ActivitiesApi* | [**getActivity**](Api/ActivitiesApi.md#getactivity) | **GET** /activities/{id} | Get details of an activity
*ActivitiesApi* | [**updateActivity**](Api/ActivitiesApi.md#updateactivity) | **PUT** /activities/{id} | Update an activity
*ActivityFieldsApi* | [**getActivityFields**](Api/ActivityFieldsApi.md#getactivityfields) | **GET** /activityFields | Get all activity fields
@@ -305,6 +305,9 @@ Class | Method | HTTP request | Description
*DealsApi* | [**deleteDealProduct**](Api/DealsApi.md#deletedealproduct) | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal
*DealsApi* | [**deleteDeals**](Api/DealsApi.md#deletedeals) | **DELETE** /deals | Delete multiple deals in bulk
*DealsApi* | [**duplicateDeal**](Api/DealsApi.md#duplicatedeal) | **POST** /deals/{id}/duplicate | Duplicate deal
+*DealsApi* | [**getArchivedDeals**](Api/DealsApi.md#getarchiveddeals) | **GET** /deals/archived | Get all archived deals
+*DealsApi* | [**getArchivedDealsSummary**](Api/DealsApi.md#getarchiveddealssummary) | **GET** /deals/summary/archived | Get archived deals summary
+*DealsApi* | [**getArchivedDealsTimeline**](Api/DealsApi.md#getarchiveddealstimeline) | **GET** /deals/timeline/archived | Get archived deals timeline
*DealsApi* | [**getDeal**](Api/DealsApi.md#getdeal) | **GET** /deals/{id} | Get details of a deal
*DealsApi* | [**getDealActivities**](Api/DealsApi.md#getdealactivities) | **GET** /deals/{id}/activities | List activities associated with a deal
*DealsApi* | [**getDealChangelog**](Api/DealsApi.md#getdealchangelog) | **GET** /deals/{id}/changelog | List updates about deal field values
@@ -318,7 +321,7 @@ Class | Method | HTTP request | Description
*DealsApi* | [**getDealUpdates**](Api/DealsApi.md#getdealupdates) | **GET** /deals/{id}/flow | List updates about a deal
*DealsApi* | [**getDealUsers**](Api/DealsApi.md#getdealusers) | **GET** /deals/{id}/permittedUsers | List permitted users
*DealsApi* | [**getDeals**](Api/DealsApi.md#getdeals) | **GET** /deals | Get all deals
-*DealsApi* | [**getDealsCollection**](Api/DealsApi.md#getdealscollection) | **GET** /deals/collection | Get all deals (BETA)
+*DealsApi* | [**getDealsCollection**](Api/DealsApi.md#getdealscollection) | **GET** /deals/collection | Get all deals collection
*DealsApi* | [**getDealsSummary**](Api/DealsApi.md#getdealssummary) | **GET** /deals/summary | Get deals summary
*DealsApi* | [**getDealsTimeline**](Api/DealsApi.md#getdealstimeline) | **GET** /deals/timeline | Get deals timeline
*DealsApi* | [**mergeDeals**](Api/DealsApi.md#mergedeals) | **PUT** /deals/{id}/merge | Merge two deals
@@ -354,6 +357,7 @@ Class | Method | HTTP request | Description
*LeadSourcesApi* | [**getLeadSources**](Api/LeadSourcesApi.md#getleadsources) | **GET** /leadSources | Get all lead sources
*LeadsApi* | [**addLead**](Api/LeadsApi.md#addlead) | **POST** /leads | Add a lead
*LeadsApi* | [**deleteLead**](Api/LeadsApi.md#deletelead) | **DELETE** /leads/{id} | Delete a lead
+*LeadsApi* | [**getArchivedLeads**](Api/LeadsApi.md#getarchivedleads) | **GET** /leads/archived | Get all archived leads
*LeadsApi* | [**getLead**](Api/LeadsApi.md#getlead) | **GET** /leads/{id} | Get one lead
*LeadsApi* | [**getLeadUsers**](Api/LeadsApi.md#getleadusers) | **GET** /leads/{id}/permittedUsers | List permitted users
*LeadsApi* | [**getLeads**](Api/LeadsApi.md#getleads) | **GET** /leads | Get all leads
@@ -413,7 +417,7 @@ Class | Method | HTTP request | Description
*OrganizationsApi* | [**getOrganizationUpdates**](Api/OrganizationsApi.md#getorganizationupdates) | **GET** /organizations/{id}/flow | List updates about an organization
*OrganizationsApi* | [**getOrganizationUsers**](Api/OrganizationsApi.md#getorganizationusers) | **GET** /organizations/{id}/permittedUsers | List permitted users
*OrganizationsApi* | [**getOrganizations**](Api/OrganizationsApi.md#getorganizations) | **GET** /organizations | Get all organizations
-*OrganizationsApi* | [**getOrganizationsCollection**](Api/OrganizationsApi.md#getorganizationscollection) | **GET** /organizations/collection | Get all organizations (BETA)
+*OrganizationsApi* | [**getOrganizationsCollection**](Api/OrganizationsApi.md#getorganizationscollection) | **GET** /organizations/collection | Get all organizations collection
*OrganizationsApi* | [**mergeOrganizations**](Api/OrganizationsApi.md#mergeorganizations) | **PUT** /organizations/{id}/merge | Merge two organizations
*OrganizationsApi* | [**searchOrganization**](Api/OrganizationsApi.md#searchorganization) | **GET** /organizations/search | Search organizations
*OrganizationsApi* | [**updateOrganization**](Api/OrganizationsApi.md#updateorganization) | **PUT** /organizations/{id} | Update an organization
@@ -444,7 +448,7 @@ Class | Method | HTTP request | Description
*PersonsApi* | [**getPersonUpdates**](Api/PersonsApi.md#getpersonupdates) | **GET** /persons/{id}/flow | List updates about a person
*PersonsApi* | [**getPersonUsers**](Api/PersonsApi.md#getpersonusers) | **GET** /persons/{id}/permittedUsers | List permitted users
*PersonsApi* | [**getPersons**](Api/PersonsApi.md#getpersons) | **GET** /persons | Get all persons
-*PersonsApi* | [**getPersonsCollection**](Api/PersonsApi.md#getpersonscollection) | **GET** /persons/collection | Get all persons (BETA)
+*PersonsApi* | [**getPersonsCollection**](Api/PersonsApi.md#getpersonscollection) | **GET** /persons/collection | Get all persons collection
*PersonsApi* | [**mergePersons**](Api/PersonsApi.md#mergepersons) | **PUT** /persons/{id}/merge | Merge two persons
*PersonsApi* | [**searchPersons**](Api/PersonsApi.md#searchpersons) | **GET** /persons/search | Search persons
*PersonsApi* | [**updatePerson**](Api/PersonsApi.md#updateperson) | **PUT** /persons/{id} | Update a person
diff --git a/docs/versions/v2/Api/ActivitiesApi.md b/docs/versions/v2/Api/ActivitiesApi.md
index 7d2e982..5d0e85b 100644
--- a/docs/versions/v2/Api/ActivitiesApi.md
+++ b/docs/versions/v2/Api/ActivitiesApi.md
@@ -144,7 +144,7 @@ Name | Type | Description | Notes
## `getActivities()`
```php
-getActivities($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor): \Pipedrive\versions\v2\Model\GetActivities
+getActivities($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $done, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor): \Pipedrive\versions\v2\Model\GetActivities
```
Get all activities
@@ -180,16 +180,17 @@ $deal_id = 56; // int | If supplied, only activities linked to the specified dea
$lead_id = 'lead_id_example'; // string | If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored.
$person_id = 56; // int | If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored.
$org_id = 56; // int | If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored.
+$done = True; // bool | If supplied, only activities with specified 'done' flag value are returned
$updated_since = 'updated_since_example'; // string | If set, only activities with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
$updated_until = 'updated_until_example'; // string | If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
-$sort_by = 'id'; // string | The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
+$sort_by = 'id'; // string | The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`.
$sort_direction = 'asc'; // string | The sorting direction. Supported values: `asc`, `desc`.
$include_fields = 'include_fields_example'; // string | Optional comma separated string array of additional fields to include
$limit = 100; // int | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
$cursor = 'cursor_example'; // string | For pagination, the marker (an opaque string value) representing the first item on the next page
try {
- $result = $apiInstance->getActivities($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor);
+ $result = $apiInstance->getActivities($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $done, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ActivitiesApi->getActivities: ', $e->getMessage(), PHP_EOL;
@@ -207,9 +208,10 @@ Name | Type | Description | Notes
**lead_id** | **string**| If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. | [optional]
**person_id** | **int**| If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored. | [optional]
**org_id** | **int**| If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored. | [optional]
+ **done** | **bool**| If supplied, only activities with specified 'done' flag value are returned | [optional]
**updated_since** | **string**| If set, only activities with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. | [optional]
**updated_until** | **string**| If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. | [optional]
- **sort_by** | **string**| The field to sort by. Supported fields: `id`, `update_time`, `add_time`. | [optional] [default to 'id']
+ **sort_by** | **string**| The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`. | [optional] [default to 'id']
**sort_direction** | **string**| The sorting direction. Supported values: `asc`, `desc`. | [optional] [default to 'asc']
**include_fields** | **string**| Optional comma separated string array of additional fields to include | [optional]
**limit** | **int**| For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. | [optional]
diff --git a/docs/versions/v2/Api/DealsApi.md b/docs/versions/v2/Api/DealsApi.md
index 1466952..ff90024 100644
--- a/docs/versions/v2/Api/DealsApi.md
+++ b/docs/versions/v2/Api/DealsApi.md
@@ -13,6 +13,7 @@ Method | HTTP request | Description
[**deleteDealProduct()**](DealsApi.md#deleteDealProduct) | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal
[**deleteInstallment()**](DealsApi.md#deleteInstallment) | **DELETE** /deals/{id}/installments/{installment_id} | Delete an installment from a deal
[**getAdditionalDiscounts()**](DealsApi.md#getAdditionalDiscounts) | **GET** /deals/{id}/discounts | List discounts added to a deal
+[**getArchivedDeals()**](DealsApi.md#getArchivedDeals) | **GET** /deals/archived | Get all archived deals
[**getDeal()**](DealsApi.md#getDeal) | **GET** /deals/{id} | Get details of a deal
[**getDealFollowers()**](DealsApi.md#getDealFollowers) | **GET** /deals/{id}/followers | List followers of a deal
[**getDealFollowersChangelog()**](DealsApi.md#getDealFollowersChangelog) | **GET** /deals/{id}/followers/changelog | List followers changelog of a deal
@@ -626,6 +627,101 @@ Name | Type | Description | Notes
[[Back to Model list]](../README.md#documentation-for-models)
[[Back to README]](../README.md)
+## `getArchivedDeals()`
+
+```php
+getArchivedDeals($filter_id, $ids, $owner_id, $person_id, $org_id, $pipeline_id, $stage_id, $status, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $custom_fields, $limit, $cursor): \Pipedrive\versions\v2\Model\GetDeals
+```
+
+Get all archived deals
+
+Returns data about all archived deals.
+
+### Example
+
+```php
+setApiKey('api_token', 'YOUR_API_KEY');
+// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+// $config = (new Pipedrive\versions\v2\Configuration())->setApiKeyPrefix('api_token', 'Bearer');
+
+// Configure OAuth2 access token for authorization: oauth2
+$config = (new Pipedrive\versions\v2\Configuration())->setAccessToken('YOUR_ACCESS_TOKEN');
+
+
+$apiInstance = new Pipedrive\versions\v2\Api\DealsApi(
+ // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
+ // This is optional, `GuzzleHttp\Client` will be used as default.
+ new GuzzleHttp\Client(),
+ $config
+);
+$filter_id = 56; // int | If supplied, only deals matching the specified filter are returned
+$ids = 'ids_example'; // string | Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response.
+$owner_id = 56; // int | If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored.
+$person_id = 56; // int | If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored.
+$org_id = 56; // int | If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored.
+$pipeline_id = 56; // int | If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored.
+$stage_id = 56; // int | If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored.
+$status = 'status_example'; // string | Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored.
+$updated_since = 'updated_since_example'; // string | If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
+$updated_until = 'updated_until_example'; // string | If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z.
+$sort_by = 'id'; // string | The field to sort by. Supported fields: `id`, `update_time`, `add_time`.
+$sort_direction = 'asc'; // string | The sorting direction. Supported values: `asc`, `desc`.
+$include_fields = 'include_fields_example'; // string | Optional comma separated string array of additional fields to include
+$custom_fields = 'custom_fields_example'; // string | Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.
A maximum of 15 keys is allowed.
+$limit = 100; // int | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed.
+$cursor = 'cursor_example'; // string | For pagination, the marker (an opaque string value) representing the first item on the next page
+
+try {
+ $result = $apiInstance->getArchivedDeals($filter_id, $ids, $owner_id, $person_id, $org_id, $pipeline_id, $stage_id, $status, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $custom_fields, $limit, $cursor);
+ print_r($result);
+} catch (Exception $e) {
+ echo 'Exception when calling DealsApi->getArchivedDeals: ', $e->getMessage(), PHP_EOL;
+}
+```
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **filter_id** | **int**| If supplied, only deals matching the specified filter are returned | [optional]
+ **ids** | **string**| Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. | [optional]
+ **owner_id** | **int**| If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. | [optional]
+ **person_id** | **int**| If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. | [optional]
+ **org_id** | **int**| If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. | [optional]
+ **pipeline_id** | **int**| If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. | [optional]
+ **stage_id** | **int**| If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. | [optional]
+ **status** | **string**| Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. | [optional]
+ **updated_since** | **string**| If set, only deals with an `update_time` later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. | [optional]
+ **updated_until** | **string**| If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. | [optional]
+ **sort_by** | **string**| The field to sort by. Supported fields: `id`, `update_time`, `add_time`. | [optional] [default to 'id']
+ **sort_direction** | **string**| The sorting direction. Supported values: `asc`, `desc`. | [optional] [default to 'asc']
+ **include_fields** | **string**| Optional comma separated string array of additional fields to include | [optional]
+ **custom_fields** | **string**| Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. | [optional]
+ **limit** | **int**| For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. | [optional]
+ **cursor** | **string**| For pagination, the marker (an opaque string value) representing the first item on the next page | [optional]
+
+### Return type
+
+[**\Pipedrive\versions\v2\Model\GetDeals**](../Model/GetDeals.md)
+
+### Authorization
+
+[api_key](../README.md#api_key), [oauth2](../README.md#oauth2)
+
+### HTTP request headers
+
+- **Content-Type**: Not defined
+- **Accept**: `application/json`
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints)
+[[Back to Model list]](../README.md#documentation-for-models)
+[[Back to README]](../README.md)
+
## `getDeal()`
```php
@@ -914,7 +1010,7 @@ getDeals($filter_id, $ids, $owner_id, $person_id, $org_id, $pipeline_id, $stage_
Get all deals
-Returns data about all deals.
+Returns data about all not archived deals.
### Example
diff --git a/docs/versions/v2/Model/DealItem.md b/docs/versions/v2/Model/DealItem.md
index 1445501..98cdb02 100644
--- a/docs/versions/v2/Model/DealItem.md
+++ b/docs/versions/v2/Model/DealItem.md
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
**add_time** | **string** | The creation date and time of the deal | [optional]
**update_time** | **string** | The last updated date and time of the deal | [optional]
**stage_change_time** | **string** | The last updated date and time of the deal stage | [optional]
+**is_archived** | **bool** | Whether the deal is archived or not | [optional]
**is_deleted** | **bool** | Whether the deal is deleted or not | [optional]
**status** | **string** | The status of the deal | [optional]
**probability** | **float** | The success probability percentage of the deal | [optional]
diff --git a/docs/versions/v2/Model/DealSearchItemItem.md b/docs/versions/v2/Model/DealSearchItemItem.md
index 3578a06..1e26713 100644
--- a/docs/versions/v2/Model/DealSearchItemItem.md
+++ b/docs/versions/v2/Model/DealSearchItemItem.md
@@ -17,5 +17,6 @@ Name | Type | Description | Notes
**organization** | [**\Pipedrive\versions\v2\Model\DealSearchItemItemOrganization**](DealSearchItemItemOrganization.md) | | [optional]
**custom_fields** | **string[]** | Custom fields | [optional]
**notes** | **string[]** | An array of notes | [optional]
+**is_archived** | **bool** | A flag indicating whether the deal is archived or not | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/docs/versions/v2/README.md b/docs/versions/v2/README.md
index 572f992..86e6d4a 100644
--- a/docs/versions/v2/README.md
+++ b/docs/versions/v2/README.md
@@ -283,6 +283,7 @@ Class | Method | HTTP request | Description
*DealsApi* | [**deleteDealProduct**](Api/DealsApi.md#deletedealproduct) | **DELETE** /deals/{id}/products/{product_attachment_id} | Delete an attached product from a deal
*DealsApi* | [**deleteInstallment**](Api/DealsApi.md#deleteinstallment) | **DELETE** /deals/{id}/installments/{installment_id} | Delete an installment from a deal
*DealsApi* | [**getAdditionalDiscounts**](Api/DealsApi.md#getadditionaldiscounts) | **GET** /deals/{id}/discounts | List discounts added to a deal
+*DealsApi* | [**getArchivedDeals**](Api/DealsApi.md#getarchiveddeals) | **GET** /deals/archived | Get all archived deals
*DealsApi* | [**getDeal**](Api/DealsApi.md#getdeal) | **GET** /deals/{id} | Get details of a deal
*DealsApi* | [**getDealFollowers**](Api/DealsApi.md#getdealfollowers) | **GET** /deals/{id}/followers | List followers of a deal
*DealsApi* | [**getDealFollowersChangelog**](Api/DealsApi.md#getdealfollowerschangelog) | **GET** /deals/{id}/followers/changelog | List followers changelog of a deal
diff --git a/lib/versions/v1/Api/ActivitiesApi.php b/lib/versions/v1/Api/ActivitiesApi.php
index 7b2a69b..3447a77 100644
--- a/lib/versions/v1/Api/ActivitiesApi.php
+++ b/lib/versions/v1/Api/ActivitiesApi.php
@@ -132,6 +132,7 @@ public function getConfig(): Configuration
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\AddActivityResponse
+ * @deprecated
*/
public function addActivity($activity_post_object = null)
{
@@ -149,6 +150,7 @@ public function addActivity($activity_post_object = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\AddActivityResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function addActivityWithHttpInfo($activity_post_object = null)
{
@@ -249,6 +251,7 @@ public function addActivityWithHttpInfo($activity_post_object = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addActivityAsync($activity_post_object = null): PromiseInterface
{
@@ -269,6 +272,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addActivityAsyncWithHttpInfo($activity_post_object = null): PromiseInterface
{
@@ -316,6 +320,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function addActivityRequest($activity_post_object = null): Request
{
@@ -419,6 +424,7 @@ public function addActivityRequest($activity_post_object = null): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeleteActivitiesResponse
+ * @deprecated
*/
public function deleteActivities($ids)
{
@@ -436,6 +442,7 @@ public function deleteActivities($ids)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeleteActivitiesResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deleteActivitiesWithHttpInfo($ids)
{
@@ -536,6 +543,7 @@ public function deleteActivitiesWithHttpInfo($ids)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteActivitiesAsync($ids): PromiseInterface
{
@@ -556,6 +564,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteActivitiesAsyncWithHttpInfo($ids): PromiseInterface
{
@@ -603,6 +612,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deleteActivitiesRequest($ids): Request
{
@@ -715,6 +725,7 @@ public function deleteActivitiesRequest($ids): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeleteActivityResponse
+ * @deprecated
*/
public function deleteActivity($id)
{
@@ -732,6 +743,7 @@ public function deleteActivity($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeleteActivityResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deleteActivityWithHttpInfo($id)
{
@@ -832,6 +844,7 @@ public function deleteActivityWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteActivityAsync($id): PromiseInterface
{
@@ -852,6 +865,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteActivityAsyncWithHttpInfo($id): PromiseInterface
{
@@ -899,6 +913,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deleteActivityRequest($id): Request
{
@@ -1018,6 +1033,7 @@ public function deleteActivityRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetActivitiesResponse
+ * @deprecated
*/
public function getActivities($user_id = null, $filter_id = null, $type = null, $limit = null, $start = null, $start_date = null, $end_date = null, $done = null)
{
@@ -1042,6 +1058,7 @@ public function getActivities($user_id = null, $filter_id = null, $type = null,
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetActivitiesResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getActivitiesWithHttpInfo($user_id = null, $filter_id = null, $type = null, $limit = null, $start = null, $start_date = null, $end_date = null, $done = null)
{
@@ -1149,6 +1166,7 @@ public function getActivitiesWithHttpInfo($user_id = null, $filter_id = null, $t
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getActivitiesAsync($user_id = null, $filter_id = null, $type = null, $limit = null, $start = null, $start_date = null, $end_date = null, $done = null): PromiseInterface
{
@@ -1176,6 +1194,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getActivitiesAsyncWithHttpInfo($user_id = null, $filter_id = null, $type = null, $limit = null, $start = null, $start_date = null, $end_date = null, $done = null): PromiseInterface
{
@@ -1230,6 +1249,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getActivitiesRequest($user_id = null, $filter_id = null, $type = null, $limit = null, $start = null, $start_date = null, $end_date = null, $done = null): Request
{
@@ -1384,7 +1404,7 @@ public function getActivitiesRequest($user_id = null, $filter_id = null, $type =
/**
* Operation getActivitiesCollection
*
- * Get all activities (BETA)
+ * Get all activities collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -1397,6 +1417,7 @@ public function getActivitiesRequest($user_id = null, $filter_id = null, $type =
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetActivitiesCollectionResponse|\Pipedrive\versions\v1\Model\FailResponse
+ * @deprecated
*/
public function getActivitiesCollection($cursor = null, $limit = null, $since = null, $until = null, $user_id = null, $done = null, $type = null)
{
@@ -1407,7 +1428,7 @@ public function getActivitiesCollection($cursor = null, $limit = null, $since =
/**
* Operation getActivitiesCollectionWithHttpInfo
*
- * Get all activities (BETA)
+ * Get all activities collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -1420,6 +1441,7 @@ public function getActivitiesCollection($cursor = null, $limit = null, $since =
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetActivitiesCollectionResponse|\Pipedrive\versions\v1\Model\FailResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getActivitiesCollectionWithHttpInfo($cursor = null, $limit = null, $since = null, $until = null, $user_id = null, $done = null, $type = null)
{
@@ -1535,7 +1557,7 @@ public function getActivitiesCollectionWithHttpInfo($cursor = null, $limit = nul
/**
* Operation getActivitiesCollectionAsync
*
- * Get all activities (BETA)
+ * Get all activities collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -1547,6 +1569,7 @@ public function getActivitiesCollectionWithHttpInfo($cursor = null, $limit = nul
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getActivitiesCollectionAsync($cursor = null, $limit = null, $since = null, $until = null, $user_id = null, $done = null, $type = null): PromiseInterface
{
@@ -1561,7 +1584,7 @@ function ($response) {
/**
* Operation getActivitiesCollectionAsyncWithHttpInfo
*
- * Get all activities (BETA)
+ * Get all activities collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -1573,6 +1596,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getActivitiesCollectionAsyncWithHttpInfo($cursor = null, $limit = null, $since = null, $until = null, $user_id = null, $done = null, $type = null): PromiseInterface
{
@@ -1626,6 +1650,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getActivitiesCollectionRequest($cursor = null, $limit = null, $since = null, $until = null, $user_id = null, $done = null, $type = null): Request
{
@@ -1779,6 +1804,7 @@ public function getActivitiesCollectionRequest($cursor = null, $limit = null, $s
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetActivityResponse
+ * @deprecated
*/
public function getActivity($id)
{
@@ -1796,6 +1822,7 @@ public function getActivity($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetActivityResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getActivityWithHttpInfo($id)
{
@@ -1896,6 +1923,7 @@ public function getActivityWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getActivityAsync($id): PromiseInterface
{
@@ -1916,6 +1944,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getActivityAsyncWithHttpInfo($id): PromiseInterface
{
@@ -1963,6 +1992,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getActivityRequest($id): Request
{
@@ -2076,6 +2106,7 @@ public function getActivityRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\UpdateActivityResponse
+ * @deprecated
*/
public function updateActivity($id, $activity_put_object = null)
{
@@ -2094,6 +2125,7 @@ public function updateActivity($id, $activity_put_object = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\UpdateActivityResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function updateActivityWithHttpInfo($id, $activity_put_object = null)
{
@@ -2195,6 +2227,7 @@ public function updateActivityWithHttpInfo($id, $activity_put_object = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateActivityAsync($id, $activity_put_object = null): PromiseInterface
{
@@ -2216,6 +2249,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateActivityAsyncWithHttpInfo($id, $activity_put_object = null): PromiseInterface
{
@@ -2264,6 +2298,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function updateActivityRequest($id, $activity_put_object = null): Request
{
diff --git a/lib/versions/v1/Api/DealsApi.php b/lib/versions/v1/Api/DealsApi.php
index f41d439..082729b 100644
--- a/lib/versions/v1/Api/DealsApi.php
+++ b/lib/versions/v1/Api/DealsApi.php
@@ -132,6 +132,7 @@ public function getConfig(): Configuration
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetAddedDeal
+ * @deprecated
*/
public function addDeal($new_deal = null)
{
@@ -149,6 +150,7 @@ public function addDeal($new_deal = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetAddedDeal, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function addDealWithHttpInfo($new_deal = null)
{
@@ -249,6 +251,7 @@ public function addDealWithHttpInfo($new_deal = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addDealAsync($new_deal = null): PromiseInterface
{
@@ -269,6 +272,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addDealAsyncWithHttpInfo($new_deal = null): PromiseInterface
{
@@ -316,6 +320,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function addDealRequest($new_deal = null): Request
{
@@ -1034,6 +1039,7 @@ public function addDealParticipantRequest($id, $add_deal_participant_request = n
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetAddProductAttachmentDetails
+ * @deprecated
*/
public function addDealProduct($id, $new_deal_product = null)
{
@@ -1052,6 +1058,7 @@ public function addDealProduct($id, $new_deal_product = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetAddProductAttachmentDetails, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function addDealProductWithHttpInfo($id, $new_deal_product = null)
{
@@ -1153,6 +1160,7 @@ public function addDealProductWithHttpInfo($id, $new_deal_product = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addDealProductAsync($id, $new_deal_product = null): PromiseInterface
{
@@ -1174,6 +1182,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addDealProductAsyncWithHttpInfo($id, $new_deal_product = null): PromiseInterface
{
@@ -1222,6 +1231,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function addDealProductRequest($id, $new_deal_product = null): Request
{
@@ -1340,6 +1350,7 @@ public function addDealProductRequest($id, $new_deal_product = null): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeleteDeal
+ * @deprecated
*/
public function deleteDeal($id)
{
@@ -1357,6 +1368,7 @@ public function deleteDeal($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeleteDeal, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deleteDealWithHttpInfo($id)
{
@@ -1457,6 +1469,7 @@ public function deleteDealWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteDealAsync($id): PromiseInterface
{
@@ -1477,6 +1490,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteDealAsyncWithHttpInfo($id): PromiseInterface
{
@@ -1524,6 +1538,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deleteDealRequest($id): Request
{
@@ -2269,6 +2284,7 @@ public function deleteDealParticipantRequest($id, $deal_participant_id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeleteDealProduct
+ * @deprecated
*/
public function deleteDealProduct($id, $product_attachment_id)
{
@@ -2287,6 +2303,7 @@ public function deleteDealProduct($id, $product_attachment_id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeleteDealProduct, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deleteDealProductWithHttpInfo($id, $product_attachment_id)
{
@@ -2388,6 +2405,7 @@ public function deleteDealProductWithHttpInfo($id, $product_attachment_id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteDealProductAsync($id, $product_attachment_id): PromiseInterface
{
@@ -2409,6 +2427,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteDealProductAsyncWithHttpInfo($id, $product_attachment_id): PromiseInterface
{
@@ -2457,6 +2476,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deleteDealProductRequest($id, $product_attachment_id): Request
{
@@ -2584,6 +2604,7 @@ public function deleteDealProductRequest($id, $product_attachment_id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeleteMultipleDeals
+ * @deprecated
*/
public function deleteDeals($ids)
{
@@ -2601,6 +2622,7 @@ public function deleteDeals($ids)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeleteMultipleDeals, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deleteDealsWithHttpInfo($ids)
{
@@ -2701,6 +2723,7 @@ public function deleteDealsWithHttpInfo($ids)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteDealsAsync($ids): PromiseInterface
{
@@ -2721,6 +2744,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteDealsAsyncWithHttpInfo($ids): PromiseInterface
{
@@ -2768,6 +2792,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deleteDealsRequest($ids): Request
{
@@ -3166,6 +3191,1215 @@ public function duplicateDealRequest($id): Request
);
}
+ /**
+ * Operation getArchivedDeals
+ *
+ * Get all archived deals
+ *
+ * @param int|null $user_id If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. (optional)
+ * @param int|null $filter_id The ID of the filter to use (optional)
+ * @param int|null $person_id If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $org_id If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $product_id If supplied, only deals linked to the specified product are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $pipeline_id If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $stage_id If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. (optional)
+ * @param string|'all_not_deleted' $status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. (optional, default to 'all_not_deleted')
+ * @param int|0 $start Pagination start (optional, default to 0)
+ * @param int|null $limit Items shown per page (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)
+ * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $owned_by_you When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. (optional)
+ *
+ * @throws ApiException on non-2xx response
+ * @throws InvalidArgumentException|GuzzleException
+ * @return \Pipedrive\versions\v1\Model\GetDeals
+ * @deprecated
+ */
+ public function getArchivedDeals($user_id = null, $filter_id = null, $person_id = null, $org_id = null, $product_id = null, $pipeline_id = null, $stage_id = null, $status = 'all_not_deleted', $start = 0, $limit = null, $sort = null, $owned_by_you = null)
+ {
+ list($response) = $this->getArchivedDealsWithHttpInfo($user_id, $filter_id, $person_id, $org_id, $product_id, $pipeline_id, $stage_id, $status, $start, $limit, $sort, $owned_by_you);
+ return $response;
+ }
+
+ /**
+ * Operation getArchivedDealsWithHttpInfo
+ *
+ * Get all archived deals
+ *
+ * @param int|null $user_id If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. (optional)
+ * @param int|null $filter_id The ID of the filter to use (optional)
+ * @param int|null $person_id If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $org_id If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $product_id If supplied, only deals linked to the specified product are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $pipeline_id If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $stage_id If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. (optional)
+ * @param string|'all_not_deleted' $status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. (optional, default to 'all_not_deleted')
+ * @param int|0 $start Pagination start (optional, default to 0)
+ * @param int|null $limit Items shown per page (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)
+ * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $owned_by_you When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. (optional)
+ *
+ * @throws ApiException on non-2xx response
+ * @throws InvalidArgumentException|GuzzleException
+ * @return array of \Pipedrive\versions\v1\Model\GetDeals, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
+ */
+ public function getArchivedDealsWithHttpInfo($user_id = null, $filter_id = null, $person_id = null, $org_id = null, $product_id = null, $pipeline_id = null, $stage_id = null, $status = 'all_not_deleted', $start = 0, $limit = null, $sort = null, $owned_by_you = null)
+ {
+ $request = $this->getArchivedDealsRequest($user_id, $filter_id, $person_id, $org_id, $product_id, $pipeline_id, $stage_id, $status, $start, $limit, $sort, $owned_by_you);
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ if ($e->getCode() === 401 && $this->config->isRefreshPossible()) {
+ $this->config->refreshToken();
+ $request = $this->getArchivedDealsRequest($user_id, $filter_id, $person_id, $org_id, $product_id, $pipeline_id, $stage_id, $status, $start, $limit, $sort, $owned_by_you);
+ $response = $this->client->send($request, $options);
+ } else {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ }
+ } catch (ConnectException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ null,
+ null
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+
+ switch($statusCode) {
+ case 200:
+ /* @phpstan-ignore-next-line */
+ if ('\Pipedrive\versions\v1\Model\GetDeals' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Pipedrive\versions\v1\Model\GetDeals', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ 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()
+ );
+ }
+
+ /* @phpstan-ignore-next-line */
+ if ('\Pipedrive\versions\v1\Model\GetDeals' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Pipedrive\versions\v1\Model\GetDeals', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ '\Pipedrive\versions\v1\Model\GetDeals',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation getArchivedDealsAsync
+ *
+ * Get all archived deals
+ *
+ * @param int|null $user_id If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. (optional)
+ * @param int|null $filter_id The ID of the filter to use (optional)
+ * @param int|null $person_id If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $org_id If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $product_id If supplied, only deals linked to the specified product are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $pipeline_id If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $stage_id If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. (optional)
+ * @param string|'all_not_deleted' $status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. (optional, default to 'all_not_deleted')
+ * @param int|0 $start Pagination start (optional, default to 0)
+ * @param int|null $limit Items shown per page (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)
+ * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $owned_by_you When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return PromiseInterface
+ * @deprecated
+ */
+ public function getArchivedDealsAsync($user_id = null, $filter_id = null, $person_id = null, $org_id = null, $product_id = null, $pipeline_id = null, $stage_id = null, $status = 'all_not_deleted', $start = 0, $limit = null, $sort = null, $owned_by_you = null): PromiseInterface
+ {
+ return $this->getArchivedDealsAsyncWithHttpInfo($user_id, $filter_id, $person_id, $org_id, $product_id, $pipeline_id, $stage_id, $status, $start, $limit, $sort, $owned_by_you)
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation getArchivedDealsAsyncWithHttpInfo
+ *
+ * Get all archived deals
+ *
+ * @param int|null $user_id If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. (optional)
+ * @param int|null $filter_id The ID of the filter to use (optional)
+ * @param int|null $person_id If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $org_id If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $product_id If supplied, only deals linked to the specified product are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $pipeline_id If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $stage_id If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. (optional)
+ * @param string|'all_not_deleted' $status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. (optional, default to 'all_not_deleted')
+ * @param int|0 $start Pagination start (optional, default to 0)
+ * @param int|null $limit Items shown per page (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)
+ * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $owned_by_you When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return PromiseInterface
+ * @deprecated
+ */
+ public function getArchivedDealsAsyncWithHttpInfo($user_id = null, $filter_id = null, $person_id = null, $org_id = null, $product_id = null, $pipeline_id = null, $stage_id = null, $status = 'all_not_deleted', $start = 0, $limit = null, $sort = null, $owned_by_you = null): PromiseInterface
+ {
+ $returnType = '\Pipedrive\versions\v1\Model\GetDeals';
+ $request = $this->getArchivedDealsRequest($user_id, $filter_id, $person_id, $org_id, $product_id, $pipeline_id, $stage_id, $status, $start, $limit, $sort, $owned_by_you);
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ /* @phpstan-ignore-next-line */
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'getArchivedDeals'
+ *
+ * @param int|null $user_id If supplied, only deals matching the given user will be returned. However, `filter_id` and `owned_by_you` takes precedence over `user_id` when supplied. (optional)
+ * @param int|null $filter_id The ID of the filter to use (optional)
+ * @param int|null $person_id If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $org_id If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $product_id If supplied, only deals linked to the specified product are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $pipeline_id If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $stage_id If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. (optional)
+ * @param string|'all_not_deleted' $status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. (optional, default to 'all_not_deleted')
+ * @param int|0 $start Pagination start (optional, default to 0)
+ * @param int|null $limit Items shown per page (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)
+ * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $owned_by_you When supplied, only deals owned by you are returned. However, `filter_id` takes precedence over `owned_by_you` when both are supplied. (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return Request
+ * @deprecated
+ */
+ public function getArchivedDealsRequest($user_id = null, $filter_id = null, $person_id = null, $org_id = null, $product_id = null, $pipeline_id = null, $stage_id = null, $status = 'all_not_deleted', $start = 0, $limit = null, $sort = null, $owned_by_you = null): Request
+ {
+
+ $resourcePath = '/deals/archived';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($user_id)) {
+ $user_id = ObjectSerializer::serializeCollection($user_id, '', true);
+ }
+ if ($user_id !== null) {
+ $queryParams['user_id'] = $user_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($filter_id)) {
+ $filter_id = ObjectSerializer::serializeCollection($filter_id, '', true);
+ }
+ if ($filter_id !== null) {
+ $queryParams['filter_id'] = $filter_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($person_id)) {
+ $person_id = ObjectSerializer::serializeCollection($person_id, '', true);
+ }
+ if ($person_id !== null) {
+ $queryParams['person_id'] = $person_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($org_id)) {
+ $org_id = ObjectSerializer::serializeCollection($org_id, '', true);
+ }
+ if ($org_id !== null) {
+ $queryParams['org_id'] = $org_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($product_id)) {
+ $product_id = ObjectSerializer::serializeCollection($product_id, '', true);
+ }
+ if ($product_id !== null) {
+ $queryParams['product_id'] = $product_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($pipeline_id)) {
+ $pipeline_id = ObjectSerializer::serializeCollection($pipeline_id, '', true);
+ }
+ if ($pipeline_id !== null) {
+ $queryParams['pipeline_id'] = $pipeline_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($stage_id)) {
+ $stage_id = ObjectSerializer::serializeCollection($stage_id, '', true);
+ }
+ if ($stage_id !== null) {
+ $queryParams['stage_id'] = $stage_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($status)) {
+ $status = ObjectSerializer::serializeCollection($status, '', true);
+ }
+ if ($status !== null) {
+ $queryParams['status'] = $status;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($start)) {
+ $start = ObjectSerializer::serializeCollection($start, '', true);
+ }
+ if ($start !== null) {
+ $queryParams['start'] = $start;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($limit)) {
+ $limit = ObjectSerializer::serializeCollection($limit, '', true);
+ }
+ if ($limit !== null) {
+ $queryParams['limit'] = $limit;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($sort)) {
+ $sort = ObjectSerializer::serializeCollection($sort, '', true);
+ }
+ if ($sort !== null) {
+ $queryParams['sort'] = $sort;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($owned_by_you)) {
+ $owned_by_you = ObjectSerializer::serializeCollection($owned_by_you, '', true);
+ }
+ if ($owned_by_you !== null) {
+ $queryParams['owned_by_you'] = $owned_by_you;
+ }
+
+
+
+
+ /* @phpstan-ignore-next-line */
+ if ($multipart) {
+ $headers = $this->headerSelector->selectHeadersForMultipart(
+ ['application/json']
+ );
+ } else {
+ $headers = $this->headerSelector->selectHeaders(
+ ['application/json'],
+ []
+ );
+ }
+
+ // for model (json/xml)
+ if (count($formParams) > 0) {
+ /* @phpstan-ignore-next-line */
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif ($headers['Content-Type'] === 'application/json') {
+ $httpBody = Utils::jsonEncode($formParams);
+
+ } else {
+ // for HTTP post (form)
+ $httpBody = Query::build($formParams);
+ }
+ }
+
+ // this endpoint requires API key authentication
+ $apiKey = $this->config->getApiKeyWithPrefix('api_token');
+ if ($apiKey !== null) {
+ $queryParams['api_token'] = $apiKey;
+ }
+ // this endpoint requires OAuth (access token)
+ if ($this->config->getAccessToken() !== null) {
+ // If access token is expired
+ if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
+ $this->config->refreshToken();
+ }
+ $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
+ }
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
+ }
+
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $query = Query::build($queryParams);
+ return new Request(
+ 'GET',
+ $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
+ /**
+ * Operation getArchivedDealsSummary
+ *
+ * Get archived deals summary
+ *
+ * @param string|null $status Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. (optional)
+ * @param int|null $filter_id <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. (optional)
+ * @param int|null $user_id Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. (optional)
+ * @param int|null $pipeline_id Only deals within the given pipeline will be returned (optional)
+ * @param int|null $stage_id Only deals within the given stage will be returned (optional)
+ *
+ * @throws ApiException on non-2xx response
+ * @throws InvalidArgumentException|GuzzleException
+ * @return \Pipedrive\versions\v1\Model\GetDealsSummary
+ * @deprecated
+ */
+ public function getArchivedDealsSummary($status = null, $filter_id = null, $user_id = null, $pipeline_id = null, $stage_id = null)
+ {
+ list($response) = $this->getArchivedDealsSummaryWithHttpInfo($status, $filter_id, $user_id, $pipeline_id, $stage_id);
+ return $response;
+ }
+
+ /**
+ * Operation getArchivedDealsSummaryWithHttpInfo
+ *
+ * Get archived deals summary
+ *
+ * @param string|null $status Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. (optional)
+ * @param int|null $filter_id <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. (optional)
+ * @param int|null $user_id Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. (optional)
+ * @param int|null $pipeline_id Only deals within the given pipeline will be returned (optional)
+ * @param int|null $stage_id Only deals within the given stage will be returned (optional)
+ *
+ * @throws ApiException on non-2xx response
+ * @throws InvalidArgumentException|GuzzleException
+ * @return array of \Pipedrive\versions\v1\Model\GetDealsSummary, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
+ */
+ public function getArchivedDealsSummaryWithHttpInfo($status = null, $filter_id = null, $user_id = null, $pipeline_id = null, $stage_id = null)
+ {
+ $request = $this->getArchivedDealsSummaryRequest($status, $filter_id, $user_id, $pipeline_id, $stage_id);
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ if ($e->getCode() === 401 && $this->config->isRefreshPossible()) {
+ $this->config->refreshToken();
+ $request = $this->getArchivedDealsSummaryRequest($status, $filter_id, $user_id, $pipeline_id, $stage_id);
+ $response = $this->client->send($request, $options);
+ } else {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ }
+ } catch (ConnectException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ null,
+ null
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+
+ switch($statusCode) {
+ case 200:
+ /* @phpstan-ignore-next-line */
+ if ('\Pipedrive\versions\v1\Model\GetDealsSummary' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Pipedrive\versions\v1\Model\GetDealsSummary', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ 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()
+ );
+ }
+
+ /* @phpstan-ignore-next-line */
+ if ('\Pipedrive\versions\v1\Model\GetDealsSummary' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Pipedrive\versions\v1\Model\GetDealsSummary', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ '\Pipedrive\versions\v1\Model\GetDealsSummary',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation getArchivedDealsSummaryAsync
+ *
+ * Get archived deals summary
+ *
+ * @param string|null $status Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. (optional)
+ * @param int|null $filter_id <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. (optional)
+ * @param int|null $user_id Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. (optional)
+ * @param int|null $pipeline_id Only deals within the given pipeline will be returned (optional)
+ * @param int|null $stage_id Only deals within the given stage will be returned (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return PromiseInterface
+ * @deprecated
+ */
+ public function getArchivedDealsSummaryAsync($status = null, $filter_id = null, $user_id = null, $pipeline_id = null, $stage_id = null): PromiseInterface
+ {
+ return $this->getArchivedDealsSummaryAsyncWithHttpInfo($status, $filter_id, $user_id, $pipeline_id, $stage_id)
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation getArchivedDealsSummaryAsyncWithHttpInfo
+ *
+ * Get archived deals summary
+ *
+ * @param string|null $status Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. (optional)
+ * @param int|null $filter_id <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. (optional)
+ * @param int|null $user_id Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. (optional)
+ * @param int|null $pipeline_id Only deals within the given pipeline will be returned (optional)
+ * @param int|null $stage_id Only deals within the given stage will be returned (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return PromiseInterface
+ * @deprecated
+ */
+ public function getArchivedDealsSummaryAsyncWithHttpInfo($status = null, $filter_id = null, $user_id = null, $pipeline_id = null, $stage_id = null): PromiseInterface
+ {
+ $returnType = '\Pipedrive\versions\v1\Model\GetDealsSummary';
+ $request = $this->getArchivedDealsSummaryRequest($status, $filter_id, $user_id, $pipeline_id, $stage_id);
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ /* @phpstan-ignore-next-line */
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'getArchivedDealsSummary'
+ *
+ * @param string|null $status Only fetch deals with a specific status. open = Open, won = Won, lost = Lost. (optional)
+ * @param int|null $filter_id <code>user_id</code> will not be considered. Only deals matching the given filter will be returned. (optional)
+ * @param int|null $user_id Only deals matching the given user will be returned. `user_id` will not be considered if you use `filter_id`. (optional)
+ * @param int|null $pipeline_id Only deals within the given pipeline will be returned (optional)
+ * @param int|null $stage_id Only deals within the given stage will be returned (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return Request
+ * @deprecated
+ */
+ public function getArchivedDealsSummaryRequest($status = null, $filter_id = null, $user_id = null, $pipeline_id = null, $stage_id = null): Request
+ {
+
+ $resourcePath = '/deals/summary/archived';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($status)) {
+ $status = ObjectSerializer::serializeCollection($status, '', true);
+ }
+ if ($status !== null) {
+ $queryParams['status'] = $status;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($filter_id)) {
+ $filter_id = ObjectSerializer::serializeCollection($filter_id, '', true);
+ }
+ if ($filter_id !== null) {
+ $queryParams['filter_id'] = $filter_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($user_id)) {
+ $user_id = ObjectSerializer::serializeCollection($user_id, '', true);
+ }
+ if ($user_id !== null) {
+ $queryParams['user_id'] = $user_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($pipeline_id)) {
+ $pipeline_id = ObjectSerializer::serializeCollection($pipeline_id, '', true);
+ }
+ if ($pipeline_id !== null) {
+ $queryParams['pipeline_id'] = $pipeline_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($stage_id)) {
+ $stage_id = ObjectSerializer::serializeCollection($stage_id, '', true);
+ }
+ if ($stage_id !== null) {
+ $queryParams['stage_id'] = $stage_id;
+ }
+
+
+
+
+ /* @phpstan-ignore-next-line */
+ if ($multipart) {
+ $headers = $this->headerSelector->selectHeadersForMultipart(
+ ['application/json']
+ );
+ } else {
+ $headers = $this->headerSelector->selectHeaders(
+ ['application/json'],
+ []
+ );
+ }
+
+ // for model (json/xml)
+ if (count($formParams) > 0) {
+ /* @phpstan-ignore-next-line */
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif ($headers['Content-Type'] === 'application/json') {
+ $httpBody = Utils::jsonEncode($formParams);
+
+ } else {
+ // for HTTP post (form)
+ $httpBody = Query::build($formParams);
+ }
+ }
+
+ // this endpoint requires API key authentication
+ $apiKey = $this->config->getApiKeyWithPrefix('api_token');
+ if ($apiKey !== null) {
+ $queryParams['api_token'] = $apiKey;
+ }
+ // this endpoint requires OAuth (access token)
+ if ($this->config->getAccessToken() !== null) {
+ // If access token is expired
+ if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
+ $this->config->refreshToken();
+ }
+ $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
+ }
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
+ }
+
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $query = Query::build($queryParams);
+ return new Request(
+ 'GET',
+ $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
+ /**
+ * Operation getArchivedDealsTimeline
+ *
+ * Get archived deals timeline
+ *
+ * @param \DateTime $start_date The date when the first interval starts. Format: YYYY-MM-DD. (required)
+ * @param string $interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> (required)
+ * @param int $amount The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months). (required)
+ * @param string $field_key The date field key which deals will be retrieved from (required)
+ * @param int|null $user_id If supplied, only deals matching the given user will be returned (optional)
+ * @param int|null $pipeline_id If supplied, only deals matching the given pipeline will be returned (optional)
+ * @param int|null $filter_id If supplied, only deals matching the given filter will be returned (optional)
+ * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $exclude_deals Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned. (optional)
+ * @param string|null $totals_convert_currency The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user's default currency is used. (optional)
+ *
+ * @throws ApiException on non-2xx response
+ * @throws InvalidArgumentException|GuzzleException
+ * @return \Pipedrive\versions\v1\Model\GetDealsTimeline
+ * @deprecated
+ */
+ public function getArchivedDealsTimeline($start_date, $interval, $amount, $field_key, $user_id = null, $pipeline_id = null, $filter_id = null, $exclude_deals = null, $totals_convert_currency = null)
+ {
+ list($response) = $this->getArchivedDealsTimelineWithHttpInfo($start_date, $interval, $amount, $field_key, $user_id, $pipeline_id, $filter_id, $exclude_deals, $totals_convert_currency);
+ return $response;
+ }
+
+ /**
+ * Operation getArchivedDealsTimelineWithHttpInfo
+ *
+ * Get archived deals timeline
+ *
+ * @param \DateTime $start_date The date when the first interval starts. Format: YYYY-MM-DD. (required)
+ * @param string $interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> (required)
+ * @param int $amount The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months). (required)
+ * @param string $field_key The date field key which deals will be retrieved from (required)
+ * @param int|null $user_id If supplied, only deals matching the given user will be returned (optional)
+ * @param int|null $pipeline_id If supplied, only deals matching the given pipeline will be returned (optional)
+ * @param int|null $filter_id If supplied, only deals matching the given filter will be returned (optional)
+ * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $exclude_deals Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned. (optional)
+ * @param string|null $totals_convert_currency The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user's default currency is used. (optional)
+ *
+ * @throws ApiException on non-2xx response
+ * @throws InvalidArgumentException|GuzzleException
+ * @return array of \Pipedrive\versions\v1\Model\GetDealsTimeline, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
+ */
+ public function getArchivedDealsTimelineWithHttpInfo($start_date, $interval, $amount, $field_key, $user_id = null, $pipeline_id = null, $filter_id = null, $exclude_deals = null, $totals_convert_currency = null)
+ {
+ $request = $this->getArchivedDealsTimelineRequest($start_date, $interval, $amount, $field_key, $user_id, $pipeline_id, $filter_id, $exclude_deals, $totals_convert_currency);
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ if ($e->getCode() === 401 && $this->config->isRefreshPossible()) {
+ $this->config->refreshToken();
+ $request = $this->getArchivedDealsTimelineRequest($start_date, $interval, $amount, $field_key, $user_id, $pipeline_id, $filter_id, $exclude_deals, $totals_convert_currency);
+ $response = $this->client->send($request, $options);
+ } else {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ }
+ } catch (ConnectException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ null,
+ null
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+
+ switch($statusCode) {
+ case 200:
+ /* @phpstan-ignore-next-line */
+ if ('\Pipedrive\versions\v1\Model\GetDealsTimeline' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Pipedrive\versions\v1\Model\GetDealsTimeline', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ 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()
+ );
+ }
+
+ /* @phpstan-ignore-next-line */
+ if ('\Pipedrive\versions\v1\Model\GetDealsTimeline' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Pipedrive\versions\v1\Model\GetDealsTimeline', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ '\Pipedrive\versions\v1\Model\GetDealsTimeline',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation getArchivedDealsTimelineAsync
+ *
+ * Get archived deals timeline
+ *
+ * @param \DateTime $start_date The date when the first interval starts. Format: YYYY-MM-DD. (required)
+ * @param string $interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> (required)
+ * @param int $amount The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months). (required)
+ * @param string $field_key The date field key which deals will be retrieved from (required)
+ * @param int|null $user_id If supplied, only deals matching the given user will be returned (optional)
+ * @param int|null $pipeline_id If supplied, only deals matching the given pipeline will be returned (optional)
+ * @param int|null $filter_id If supplied, only deals matching the given filter will be returned (optional)
+ * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $exclude_deals Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned. (optional)
+ * @param string|null $totals_convert_currency The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user's default currency is used. (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return PromiseInterface
+ * @deprecated
+ */
+ public function getArchivedDealsTimelineAsync($start_date, $interval, $amount, $field_key, $user_id = null, $pipeline_id = null, $filter_id = null, $exclude_deals = null, $totals_convert_currency = null): PromiseInterface
+ {
+ return $this->getArchivedDealsTimelineAsyncWithHttpInfo($start_date, $interval, $amount, $field_key, $user_id, $pipeline_id, $filter_id, $exclude_deals, $totals_convert_currency)
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation getArchivedDealsTimelineAsyncWithHttpInfo
+ *
+ * Get archived deals timeline
+ *
+ * @param \DateTime $start_date The date when the first interval starts. Format: YYYY-MM-DD. (required)
+ * @param string $interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> (required)
+ * @param int $amount The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months). (required)
+ * @param string $field_key The date field key which deals will be retrieved from (required)
+ * @param int|null $user_id If supplied, only deals matching the given user will be returned (optional)
+ * @param int|null $pipeline_id If supplied, only deals matching the given pipeline will be returned (optional)
+ * @param int|null $filter_id If supplied, only deals matching the given filter will be returned (optional)
+ * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $exclude_deals Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned. (optional)
+ * @param string|null $totals_convert_currency The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user's default currency is used. (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return PromiseInterface
+ * @deprecated
+ */
+ public function getArchivedDealsTimelineAsyncWithHttpInfo($start_date, $interval, $amount, $field_key, $user_id = null, $pipeline_id = null, $filter_id = null, $exclude_deals = null, $totals_convert_currency = null): PromiseInterface
+ {
+ $returnType = '\Pipedrive\versions\v1\Model\GetDealsTimeline';
+ $request = $this->getArchivedDealsTimelineRequest($start_date, $interval, $amount, $field_key, $user_id, $pipeline_id, $filter_id, $exclude_deals, $totals_convert_currency);
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ /* @phpstan-ignore-next-line */
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'getArchivedDealsTimeline'
+ *
+ * @param \DateTime $start_date The date when the first interval starts. Format: YYYY-MM-DD. (required)
+ * @param string $interval The type of the interval<table><tr><th>Value</th><th>Description</th></tr><tr><td>`day`</td><td>Day</td></tr><tr><td>`week`</td><td>A full week (7 days) starting from `start_date`</td></tr><tr><td>`month`</td><td>A full month (depending on the number of days in given month) starting from `start_date`</td></tr><tr><td>`quarter`</td><td>A full quarter (3 months) starting from `start_date`</td></tr></table> (required)
+ * @param int $amount The number of given intervals, starting from `start_date`, to fetch. E.g. 3 (months). (required)
+ * @param string $field_key The date field key which deals will be retrieved from (required)
+ * @param int|null $user_id If supplied, only deals matching the given user will be returned (optional)
+ * @param int|null $pipeline_id If supplied, only deals matching the given pipeline will be returned (optional)
+ * @param int|null $filter_id If supplied, only deals matching the given filter will be returned (optional)
+ * @param \Pipedrive\versions\v1\Model\NumberBoolean|null $exclude_deals Whether to exclude deals list (1) or not (0). Note that when deals are excluded, the timeline summary (counts and values) is still returned. (optional)
+ * @param string|null $totals_convert_currency The 3-letter currency code of any of the supported currencies. When supplied, `totals_converted` is returned per each interval which contains the currency-converted total amounts in the given currency. You may also set this parameter to `default_currency` in which case the user's default currency is used. (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return Request
+ * @deprecated
+ */
+ public function getArchivedDealsTimelineRequest($start_date, $interval, $amount, $field_key, $user_id = null, $pipeline_id = null, $filter_id = null, $exclude_deals = null, $totals_convert_currency = null): Request
+ {
+ // verify the required parameter 'start_date' is set
+ /* @phpstan-ignore-next-line */
+ if ($start_date === null || (is_array($start_date) && count($start_date) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $start_date when calling getArchivedDealsTimeline'
+ );
+ }
+ // verify the required parameter 'interval' is set
+ /* @phpstan-ignore-next-line */
+ if ($interval === null || (is_array($interval) && count($interval) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $interval when calling getArchivedDealsTimeline'
+ );
+ }
+ // verify the required parameter 'amount' is set
+ /* @phpstan-ignore-next-line */
+ if ($amount === null || (is_array($amount) && count($amount) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $amount when calling getArchivedDealsTimeline'
+ );
+ }
+ // verify the required parameter 'field_key' is set
+ /* @phpstan-ignore-next-line */
+ if ($field_key === null || (is_array($field_key) && count($field_key) === 0)) {
+ throw new \InvalidArgumentException(
+ 'Missing the required parameter $field_key when calling getArchivedDealsTimeline'
+ );
+ }
+
+ $resourcePath = '/deals/timeline/archived';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($start_date)) {
+ $start_date = ObjectSerializer::serializeCollection($start_date, '', true);
+ }
+ if ($start_date !== null) {
+ $queryParams['start_date'] = $start_date;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($interval)) {
+ $interval = ObjectSerializer::serializeCollection($interval, '', true);
+ }
+ if ($interval !== null) {
+ $queryParams['interval'] = $interval;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($amount)) {
+ $amount = ObjectSerializer::serializeCollection($amount, '', true);
+ }
+ if ($amount !== null) {
+ $queryParams['amount'] = $amount;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($field_key)) {
+ $field_key = ObjectSerializer::serializeCollection($field_key, '', true);
+ }
+ if ($field_key !== null) {
+ $queryParams['field_key'] = $field_key;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($user_id)) {
+ $user_id = ObjectSerializer::serializeCollection($user_id, '', true);
+ }
+ if ($user_id !== null) {
+ $queryParams['user_id'] = $user_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($pipeline_id)) {
+ $pipeline_id = ObjectSerializer::serializeCollection($pipeline_id, '', true);
+ }
+ if ($pipeline_id !== null) {
+ $queryParams['pipeline_id'] = $pipeline_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($filter_id)) {
+ $filter_id = ObjectSerializer::serializeCollection($filter_id, '', true);
+ }
+ if ($filter_id !== null) {
+ $queryParams['filter_id'] = $filter_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($exclude_deals)) {
+ $exclude_deals = ObjectSerializer::serializeCollection($exclude_deals, '', true);
+ }
+ if ($exclude_deals !== null) {
+ $queryParams['exclude_deals'] = $exclude_deals;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($totals_convert_currency)) {
+ $totals_convert_currency = ObjectSerializer::serializeCollection($totals_convert_currency, '', true);
+ }
+ if ($totals_convert_currency !== null) {
+ $queryParams['totals_convert_currency'] = $totals_convert_currency;
+ }
+
+
+
+
+ /* @phpstan-ignore-next-line */
+ if ($multipart) {
+ $headers = $this->headerSelector->selectHeadersForMultipart(
+ ['application/json']
+ );
+ } else {
+ $headers = $this->headerSelector->selectHeaders(
+ ['application/json'],
+ []
+ );
+ }
+
+ // for model (json/xml)
+ if (count($formParams) > 0) {
+ /* @phpstan-ignore-next-line */
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif ($headers['Content-Type'] === 'application/json') {
+ $httpBody = Utils::jsonEncode($formParams);
+
+ } else {
+ // for HTTP post (form)
+ $httpBody = Query::build($formParams);
+ }
+ }
+
+ // this endpoint requires API key authentication
+ $apiKey = $this->config->getApiKeyWithPrefix('api_token');
+ if ($apiKey !== null) {
+ $queryParams['api_token'] = $apiKey;
+ }
+ // this endpoint requires OAuth (access token)
+ if ($this->config->getAccessToken() !== null) {
+ // If access token is expired
+ if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
+ $this->config->refreshToken();
+ }
+ $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
+ }
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
+ }
+
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $query = Query::build($queryParams);
+ return new Request(
+ 'GET',
+ $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
/**
* Operation getDeal
*
@@ -3176,6 +4410,7 @@ public function duplicateDealRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetDeal
+ * @deprecated
*/
public function getDeal($id)
{
@@ -3193,6 +4428,7 @@ public function getDeal($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetDeal, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getDealWithHttpInfo($id)
{
@@ -3293,6 +4529,7 @@ public function getDealWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealAsync($id): PromiseInterface
{
@@ -3313,6 +4550,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealAsyncWithHttpInfo($id): PromiseInterface
{
@@ -3360,6 +4598,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getDealRequest($id): Request
{
@@ -3476,6 +4715,7 @@ public function getDealRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DealListActivitiesResponse
+ * @deprecated
*/
public function getDealActivities($id, $start = 0, $limit = null, $done = null, $exclude = null)
{
@@ -3497,6 +4737,7 @@ public function getDealActivities($id, $start = 0, $limit = null, $done = null,
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DealListActivitiesResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getDealActivitiesWithHttpInfo($id, $start = 0, $limit = null, $done = null, $exclude = null)
{
@@ -3601,6 +4842,7 @@ public function getDealActivitiesWithHttpInfo($id, $start = 0, $limit = null, $d
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealActivitiesAsync($id, $start = 0, $limit = null, $done = null, $exclude = null): PromiseInterface
{
@@ -3625,6 +4867,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealActivitiesAsyncWithHttpInfo($id, $start = 0, $limit = null, $done = null, $exclude = null): PromiseInterface
{
@@ -3676,6 +4919,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getDealActivitiesRequest($id, $start = 0, $limit = null, $done = null, $exclude = null): Request
{
@@ -5745,6 +6989,7 @@ public function getDealParticipantsChangelogRequest($id, $limit = null, $cursor
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ListPersonsResponse
+ * @deprecated
*/
public function getDealPersons($id, $start = 0, $limit = null)
{
@@ -5764,6 +7009,7 @@ public function getDealPersons($id, $start = 0, $limit = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ListPersonsResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getDealPersonsWithHttpInfo($id, $start = 0, $limit = null)
{
@@ -5866,6 +7112,7 @@ public function getDealPersonsWithHttpInfo($id, $start = 0, $limit = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealPersonsAsync($id, $start = 0, $limit = null): PromiseInterface
{
@@ -5888,6 +7135,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealPersonsAsyncWithHttpInfo($id, $start = 0, $limit = null): PromiseInterface
{
@@ -5937,6 +7185,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getDealPersonsRequest($id, $start = 0, $limit = null): Request
{
@@ -6068,6 +7317,7 @@ public function getDealPersonsRequest($id, $start = 0, $limit = null): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ListProductsResponse
+ * @deprecated
*/
public function getDealProducts($id, $start = 0, $limit = null, $include_product_data = null)
{
@@ -6088,6 +7338,7 @@ public function getDealProducts($id, $start = 0, $limit = null, $include_product
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ListProductsResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getDealProductsWithHttpInfo($id, $start = 0, $limit = null, $include_product_data = null)
{
@@ -6191,6 +7442,7 @@ public function getDealProductsWithHttpInfo($id, $start = 0, $limit = null, $inc
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealProductsAsync($id, $start = 0, $limit = null, $include_product_data = null): PromiseInterface
{
@@ -6214,6 +7466,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealProductsAsyncWithHttpInfo($id, $start = 0, $limit = null, $include_product_data = null): PromiseInterface
{
@@ -6264,6 +7517,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getDealProductsRequest($id, $start = 0, $limit = null, $include_product_data = null): Request
{
@@ -7051,6 +8305,7 @@ public function getDealUsersRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetDeals
+ * @deprecated
*/
public function getDeals($user_id = null, $filter_id = null, $stage_id = null, $status = 'all_not_deleted', $start = 0, $limit = null, $sort = null, $owned_by_you = null)
{
@@ -7075,6 +8330,7 @@ public function getDeals($user_id = null, $filter_id = null, $stage_id = null, $
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetDeals, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getDealsWithHttpInfo($user_id = null, $filter_id = null, $stage_id = null, $status = 'all_not_deleted', $start = 0, $limit = null, $sort = null, $owned_by_you = null)
{
@@ -7182,6 +8438,7 @@ public function getDealsWithHttpInfo($user_id = null, $filter_id = null, $stage_
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealsAsync($user_id = null, $filter_id = null, $stage_id = null, $status = 'all_not_deleted', $start = 0, $limit = null, $sort = null, $owned_by_you = null): PromiseInterface
{
@@ -7209,6 +8466,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealsAsyncWithHttpInfo($user_id = null, $filter_id = null, $stage_id = null, $status = 'all_not_deleted', $start = 0, $limit = null, $sort = null, $owned_by_you = null): PromiseInterface
{
@@ -7263,6 +8521,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getDealsRequest($user_id = null, $filter_id = null, $stage_id = null, $status = 'all_not_deleted', $start = 0, $limit = null, $sort = null, $owned_by_you = null): Request
{
@@ -7417,7 +8676,7 @@ public function getDealsRequest($user_id = null, $filter_id = null, $stage_id =
/**
* Operation getDealsCollection
*
- * Get all deals (BETA)
+ * Get all deals collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -7430,6 +8689,7 @@ public function getDealsRequest($user_id = null, $filter_id = null, $stage_id =
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetDealsCollection|\Pipedrive\versions\v1\Model\FailResponse
+ * @deprecated
*/
public function getDealsCollection($cursor = null, $limit = null, $since = null, $until = null, $user_id = null, $stage_id = null, $status = null)
{
@@ -7440,7 +8700,7 @@ public function getDealsCollection($cursor = null, $limit = null, $since = null,
/**
* Operation getDealsCollectionWithHttpInfo
*
- * Get all deals (BETA)
+ * Get all deals collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -7453,6 +8713,7 @@ public function getDealsCollection($cursor = null, $limit = null, $since = null,
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetDealsCollection|\Pipedrive\versions\v1\Model\FailResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getDealsCollectionWithHttpInfo($cursor = null, $limit = null, $since = null, $until = null, $user_id = null, $stage_id = null, $status = null)
{
@@ -7568,7 +8829,7 @@ public function getDealsCollectionWithHttpInfo($cursor = null, $limit = null, $s
/**
* Operation getDealsCollectionAsync
*
- * Get all deals (BETA)
+ * Get all deals collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -7580,6 +8841,7 @@ public function getDealsCollectionWithHttpInfo($cursor = null, $limit = null, $s
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealsCollectionAsync($cursor = null, $limit = null, $since = null, $until = null, $user_id = null, $stage_id = null, $status = null): PromiseInterface
{
@@ -7594,7 +8856,7 @@ function ($response) {
/**
* Operation getDealsCollectionAsyncWithHttpInfo
*
- * Get all deals (BETA)
+ * Get all deals collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -7606,6 +8868,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getDealsCollectionAsyncWithHttpInfo($cursor = null, $limit = null, $since = null, $until = null, $user_id = null, $stage_id = null, $status = null): PromiseInterface
{
@@ -7659,6 +8922,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getDealsCollectionRequest($cursor = null, $limit = null, $since = null, $until = null, $user_id = null, $stage_id = null, $status = null): Request
{
@@ -8889,6 +10153,7 @@ public function mergeDealsRequest($id, $merge_deals_request = null): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DealSearchResponse
+ * @deprecated
*/
public function searchDeals($term, $fields = null, $exact_match = null, $person_id = null, $organization_id = null, $status = null, $include_fields = null, $start = 0, $limit = null)
{
@@ -8914,6 +10179,7 @@ public function searchDeals($term, $fields = null, $exact_match = null, $person_
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DealSearchResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function searchDealsWithHttpInfo($term, $fields = null, $exact_match = null, $person_id = null, $organization_id = null, $status = null, $include_fields = null, $start = 0, $limit = null)
{
@@ -9022,6 +10288,7 @@ public function searchDealsWithHttpInfo($term, $fields = null, $exact_match = nu
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchDealsAsync($term, $fields = null, $exact_match = null, $person_id = null, $organization_id = null, $status = null, $include_fields = null, $start = 0, $limit = null): PromiseInterface
{
@@ -9050,6 +10317,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchDealsAsyncWithHttpInfo($term, $fields = null, $exact_match = null, $person_id = null, $organization_id = null, $status = null, $include_fields = null, $start = 0, $limit = null): PromiseInterface
{
@@ -9105,6 +10373,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function searchDealsRequest($term, $fields = null, $exact_match = null, $person_id = null, $organization_id = null, $status = null, $include_fields = null, $start = 0, $limit = null): Request
{
@@ -9282,6 +10551,7 @@ public function searchDealsRequest($term, $fields = null, $exact_match = null, $
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetAddedDeal
+ * @deprecated
*/
public function updateDeal($id, $update_deal_request = null)
{
@@ -9300,6 +10570,7 @@ public function updateDeal($id, $update_deal_request = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetAddedDeal, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function updateDealWithHttpInfo($id, $update_deal_request = null)
{
@@ -9401,6 +10672,7 @@ public function updateDealWithHttpInfo($id, $update_deal_request = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateDealAsync($id, $update_deal_request = null): PromiseInterface
{
@@ -9422,6 +10694,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateDealAsyncWithHttpInfo($id, $update_deal_request = null): PromiseInterface
{
@@ -9470,6 +10743,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function updateDealRequest($id, $update_deal_request = null): Request
{
@@ -9590,6 +10864,7 @@ public function updateDealRequest($id, $update_deal_request = null): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetProductAttachmentDetails
+ * @deprecated
*/
public function updateDealProduct($id, $product_attachment_id, $update_deal_product = null)
{
@@ -9609,6 +10884,7 @@ public function updateDealProduct($id, $product_attachment_id, $update_deal_prod
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetProductAttachmentDetails, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function updateDealProductWithHttpInfo($id, $product_attachment_id, $update_deal_product = null)
{
@@ -9711,6 +10987,7 @@ public function updateDealProductWithHttpInfo($id, $product_attachment_id, $upda
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateDealProductAsync($id, $product_attachment_id, $update_deal_product = null): PromiseInterface
{
@@ -9733,6 +11010,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateDealProductAsyncWithHttpInfo($id, $product_attachment_id, $update_deal_product = null): PromiseInterface
{
@@ -9782,6 +11060,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function updateDealProductRequest($id, $product_attachment_id, $update_deal_product = null): Request
{
diff --git a/lib/versions/v1/Api/ItemSearchApi.php b/lib/versions/v1/Api/ItemSearchApi.php
index 0539448..c9d1058 100644
--- a/lib/versions/v1/Api/ItemSearchApi.php
+++ b/lib/versions/v1/Api/ItemSearchApi.php
@@ -139,6 +139,7 @@ public function getConfig(): Configuration
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ItemSearchResponse
+ * @deprecated
*/
public function searchItem($term, $item_types = null, $fields = null, $search_for_related_items = null, $exact_match = null, $include_fields = null, $start = 0, $limit = null)
{
@@ -163,6 +164,7 @@ public function searchItem($term, $item_types = null, $fields = null, $search_fo
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ItemSearchResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function searchItemWithHttpInfo($term, $item_types = null, $fields = null, $search_for_related_items = null, $exact_match = null, $include_fields = null, $start = 0, $limit = null)
{
@@ -270,6 +272,7 @@ public function searchItemWithHttpInfo($term, $item_types = null, $fields = null
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchItemAsync($term, $item_types = null, $fields = null, $search_for_related_items = null, $exact_match = null, $include_fields = null, $start = 0, $limit = null): PromiseInterface
{
@@ -297,6 +300,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchItemAsyncWithHttpInfo($term, $item_types = null, $fields = null, $search_for_related_items = null, $exact_match = null, $include_fields = null, $start = 0, $limit = null): PromiseInterface
{
@@ -351,6 +355,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function searchItemRequest($term, $item_types = null, $fields = null, $search_for_related_items = null, $exact_match = null, $include_fields = null, $start = 0, $limit = null): Request
{
@@ -525,6 +530,7 @@ public function searchItemRequest($term, $item_types = null, $fields = null, $se
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ItemSearchFieldResponse
+ * @deprecated
*/
public function searchItemByField($term, $field_type, $field_key, $exact_match = false, $return_item_ids = null, $start = null, $limit = null)
{
@@ -548,6 +554,7 @@ public function searchItemByField($term, $field_type, $field_key, $exact_match =
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ItemSearchFieldResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function searchItemByFieldWithHttpInfo($term, $field_type, $field_key, $exact_match = false, $return_item_ids = null, $start = null, $limit = null)
{
@@ -654,6 +661,7 @@ public function searchItemByFieldWithHttpInfo($term, $field_type, $field_key, $e
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchItemByFieldAsync($term, $field_type, $field_key, $exact_match = false, $return_item_ids = null, $start = null, $limit = null): PromiseInterface
{
@@ -680,6 +688,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchItemByFieldAsyncWithHttpInfo($term, $field_type, $field_key, $exact_match = false, $return_item_ids = null, $start = null, $limit = null): PromiseInterface
{
@@ -733,6 +742,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function searchItemByFieldRequest($term, $field_type, $field_key, $exact_match = false, $return_item_ids = null, $start = null, $limit = null): Request
{
diff --git a/lib/versions/v1/Api/LeadsApi.php b/lib/versions/v1/Api/LeadsApi.php
index 7f73c55..7c6b645 100644
--- a/lib/versions/v1/Api/LeadsApi.php
+++ b/lib/versions/v1/Api/LeadsApi.php
@@ -726,6 +726,373 @@ public function deleteLeadRequest($id): Request
);
}
+ /**
+ * Operation getArchivedLeads
+ *
+ * Get all archived leads
+ *
+ * @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. (optional)
+ * @param int|null $start For pagination, the position that represents the first result for the page (optional)
+ * @param int|null $owner_id If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. (optional)
+ * @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 $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 getArchivedLeads($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $sort = null)
+ {
+ list($response) = $this->getArchivedLeadsWithHttpInfo($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
+ return $response;
+ }
+
+ /**
+ * Operation getArchivedLeadsWithHttpInfo
+ *
+ * Get all archived leads
+ *
+ * @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. (optional)
+ * @param int|null $start For pagination, the position that represents the first result for the page (optional)
+ * @param int|null $owner_id If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. (optional)
+ * @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 $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 getArchivedLeadsWithHttpInfo($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $sort = null)
+ {
+ $request = $this->getArchivedLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ if ($e->getCode() === 401 && $this->config->isRefreshPossible()) {
+ $this->config->refreshToken();
+ $request = $this->getArchivedLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
+ $response = $this->client->send($request, $options);
+ } else {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ }
+ } catch (ConnectException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ null,
+ null
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+
+ switch($statusCode) {
+ case 200:
+ /* @phpstan-ignore-next-line */
+ if ('\Pipedrive\versions\v1\Model\GetLeadsResponse' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Pipedrive\versions\v1\Model\GetLeadsResponse', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ 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()
+ );
+ }
+
+ /* @phpstan-ignore-next-line */
+ if ('\Pipedrive\versions\v1\Model\GetLeadsResponse' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Pipedrive\versions\v1\Model\GetLeadsResponse', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ '\Pipedrive\versions\v1\Model\GetLeadsResponse',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation getArchivedLeadsAsync
+ *
+ * Get all archived leads
+ *
+ * @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. (optional)
+ * @param int|null $start For pagination, the position that represents the first result for the page (optional)
+ * @param int|null $owner_id If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. (optional)
+ * @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 $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 getArchivedLeadsAsync($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $sort = null): PromiseInterface
+ {
+ return $this->getArchivedLeadsAsyncWithHttpInfo($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort)
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation getArchivedLeadsAsyncWithHttpInfo
+ *
+ * Get all archived leads
+ *
+ * @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. (optional)
+ * @param int|null $start For pagination, the position that represents the first result for the page (optional)
+ * @param int|null $owner_id If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. (optional)
+ * @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 $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 getArchivedLeadsAsyncWithHttpInfo($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $sort = null): PromiseInterface
+ {
+ $returnType = '\Pipedrive\versions\v1\Model\GetLeadsResponse';
+ $request = $this->getArchivedLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ /* @phpstan-ignore-next-line */
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'getArchivedLeads'
+ *
+ * @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. (optional)
+ * @param int|null $start For pagination, the position that represents the first result for the page (optional)
+ * @param int|null $owner_id If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. (optional)
+ * @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 $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 getArchivedLeadsRequest($limit = null, $start = null, $owner_id = null, $person_id = null, $organization_id = null, $filter_id = null, $sort = null): Request
+ {
+
+ $resourcePath = '/leads/archived';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($limit)) {
+ $limit = ObjectSerializer::serializeCollection($limit, '', true);
+ }
+ if ($limit !== null) {
+ $queryParams['limit'] = $limit;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($start)) {
+ $start = ObjectSerializer::serializeCollection($start, '', true);
+ }
+ if ($start !== null) {
+ $queryParams['start'] = $start;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($owner_id)) {
+ $owner_id = ObjectSerializer::serializeCollection($owner_id, '', true);
+ }
+ if ($owner_id !== null) {
+ $queryParams['owner_id'] = $owner_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($person_id)) {
+ $person_id = ObjectSerializer::serializeCollection($person_id, '', true);
+ }
+ if ($person_id !== null) {
+ $queryParams['person_id'] = $person_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($organization_id)) {
+ $organization_id = ObjectSerializer::serializeCollection($organization_id, '', true);
+ }
+ if ($organization_id !== null) {
+ $queryParams['organization_id'] = $organization_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($filter_id)) {
+ $filter_id = ObjectSerializer::serializeCollection($filter_id, '', true);
+ }
+ if ($filter_id !== null) {
+ $queryParams['filter_id'] = $filter_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($sort)) {
+ $sort = ObjectSerializer::serializeCollection($sort, '', true);
+ }
+ if ($sort !== null) {
+ $queryParams['sort'] = $sort;
+ }
+
+
+
+
+ /* @phpstan-ignore-next-line */
+ if ($multipart) {
+ $headers = $this->headerSelector->selectHeadersForMultipart(
+ ['application/json']
+ );
+ } else {
+ $headers = $this->headerSelector->selectHeaders(
+ ['application/json'],
+ []
+ );
+ }
+
+ // for model (json/xml)
+ if (count($formParams) > 0) {
+ /* @phpstan-ignore-next-line */
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif ($headers['Content-Type'] === 'application/json') {
+ $httpBody = Utils::jsonEncode($formParams);
+
+ } else {
+ // for HTTP post (form)
+ $httpBody = Query::build($formParams);
+ }
+ }
+
+ // this endpoint requires API key authentication
+ $apiKey = $this->config->getApiKeyWithPrefix('api_token');
+ if ($apiKey !== null) {
+ $queryParams['api_token'] = $apiKey;
+ }
+ // this endpoint requires OAuth (access token)
+ if ($this->config->getAccessToken() !== null) {
+ // If access token is expired
+ if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
+ $this->config->refreshToken();
+ }
+ $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
+ }
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
+ }
+
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $query = Query::build($queryParams);
+ return new Request(
+ 'GET',
+ $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
/**
* Operation getLead
*
@@ -1346,7 +1713,6 @@ public function getLeadUsersRequest($id): Request
*
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. (optional)
* @param int|null $start For pagination, the position that represents the first result for the page (optional)
- * @param string|null $archived_status Filtering based on the archived status of a lead. If not provided, `All` is used. (optional)
* @param int|null $owner_id If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. (optional)
* @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)
@@ -1357,9 +1723,9 @@ public function getLeadUsersRequest($id): Request
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetLeadsResponse
*/
- public function getLeads($limit = null, $start = null, $archived_status = 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, $sort = null)
{
- list($response) = $this->getLeadsWithHttpInfo($limit, $start, $archived_status, $owner_id, $person_id, $organization_id, $filter_id, $sort);
+ list($response) = $this->getLeadsWithHttpInfo($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
return $response;
}
@@ -1370,7 +1736,6 @@ public function getLeads($limit = null, $start = null, $archived_status = null,
*
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. (optional)
* @param int|null $start For pagination, the position that represents the first result for the page (optional)
- * @param string|null $archived_status Filtering based on the archived status of a lead. If not provided, `All` is used. (optional)
* @param int|null $owner_id If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. (optional)
* @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)
@@ -1381,9 +1746,9 @@ public function getLeads($limit = null, $start = null, $archived_status = null,
* @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, $archived_status = 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, $sort = null)
{
- $request = $this->getLeadsRequest($limit, $start, $archived_status, $owner_id, $person_id, $organization_id, $filter_id, $sort);
+ $request = $this->getLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
try {
$options = $this->createHttpClientOption();
@@ -1392,7 +1757,7 @@ public function getLeadsWithHttpInfo($limit = null, $start = null, $archived_sta
} catch (RequestException $e) {
if ($e->getCode() === 401 && $this->config->isRefreshPossible()) {
$this->config->refreshToken();
- $request = $this->getLeadsRequest($limit, $start, $archived_status, $owner_id, $person_id, $organization_id, $filter_id, $sort);
+ $request = $this->getLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
$response = $this->client->send($request, $options);
} else {
throw new ApiException(
@@ -1478,7 +1843,6 @@ public function getLeadsWithHttpInfo($limit = null, $start = null, $archived_sta
*
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. (optional)
* @param int|null $start For pagination, the position that represents the first result for the page (optional)
- * @param string|null $archived_status Filtering based on the archived status of a lead. If not provided, `All` is used. (optional)
* @param int|null $owner_id If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. (optional)
* @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)
@@ -1488,9 +1852,9 @@ public function getLeadsWithHttpInfo($limit = null, $start = null, $archived_sta
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
*/
- public function getLeadsAsync($limit = null, $start = null, $archived_status = 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, $sort = null): PromiseInterface
{
- return $this->getLeadsAsyncWithHttpInfo($limit, $start, $archived_status, $owner_id, $person_id, $organization_id, $filter_id, $sort)
+ return $this->getLeadsAsyncWithHttpInfo($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort)
->then(
function ($response) {
return $response[0];
@@ -1505,7 +1869,6 @@ function ($response) {
*
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. (optional)
* @param int|null $start For pagination, the position that represents the first result for the page (optional)
- * @param string|null $archived_status Filtering based on the archived status of a lead. If not provided, `All` is used. (optional)
* @param int|null $owner_id If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. (optional)
* @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)
@@ -1515,10 +1878,10 @@ function ($response) {
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
*/
- public function getLeadsAsyncWithHttpInfo($limit = null, $start = null, $archived_status = 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, $sort = null): PromiseInterface
{
$returnType = '\Pipedrive\versions\v1\Model\GetLeadsResponse';
- $request = $this->getLeadsRequest($limit, $start, $archived_status, $owner_id, $person_id, $organization_id, $filter_id, $sort);
+ $request = $this->getLeadsRequest($limit, $start, $owner_id, $person_id, $organization_id, $filter_id, $sort);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -1559,7 +1922,6 @@ function ($exception) {
*
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. (optional)
* @param int|null $start For pagination, the position that represents the first result for the page (optional)
- * @param string|null $archived_status Filtering based on the archived status of a lead. If not provided, `All` is used. (optional)
* @param int|null $owner_id If supplied, only leads matching the given user will be returned. However, `filter_id` takes precedence over `owner_id` when supplied. (optional)
* @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)
@@ -1569,7 +1931,7 @@ function ($exception) {
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
*/
- public function getLeadsRequest($limit = null, $start = null, $archived_status = 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, $sort = null): Request
{
$resourcePath = '/leads';
@@ -1597,14 +1959,6 @@ public function getLeadsRequest($limit = null, $start = null, $archived_status =
}
// query params
/* @phpstan-ignore-next-line */
- if (is_array($archived_status)) {
- $archived_status = ObjectSerializer::serializeCollection($archived_status, '', true);
- }
- if ($archived_status !== null) {
- $queryParams['archived_status'] = $archived_status;
- }
- // query params
- /* @phpstan-ignore-next-line */
if (is_array($owner_id)) {
$owner_id = ObjectSerializer::serializeCollection($owner_id, '', true);
}
diff --git a/lib/versions/v1/Api/OrganizationsApi.php b/lib/versions/v1/Api/OrganizationsApi.php
index 5e68f25..20e1332 100644
--- a/lib/versions/v1/Api/OrganizationsApi.php
+++ b/lib/versions/v1/Api/OrganizationsApi.php
@@ -132,6 +132,7 @@ public function getConfig(): Configuration
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\OrganizationPostResponse
+ * @deprecated
*/
public function addOrganization($new_organization = null)
{
@@ -149,6 +150,7 @@ public function addOrganization($new_organization = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\OrganizationPostResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function addOrganizationWithHttpInfo($new_organization = null)
{
@@ -249,6 +251,7 @@ public function addOrganizationWithHttpInfo($new_organization = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addOrganizationAsync($new_organization = null): PromiseInterface
{
@@ -269,6 +272,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addOrganizationAsyncWithHttpInfo($new_organization = null): PromiseInterface
{
@@ -316,6 +320,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function addOrganizationRequest($new_organization = null): Request
{
@@ -726,6 +731,7 @@ public function addOrganizationFollowerRequest($id, $add_organization_follower_r
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\OrganizationDeleteResponse
+ * @deprecated
*/
public function deleteOrganization($id)
{
@@ -743,6 +749,7 @@ public function deleteOrganization($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\OrganizationDeleteResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deleteOrganizationWithHttpInfo($id)
{
@@ -843,6 +850,7 @@ public function deleteOrganizationWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteOrganizationAsync($id): PromiseInterface
{
@@ -863,6 +871,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteOrganizationAsyncWithHttpInfo($id): PromiseInterface
{
@@ -910,6 +919,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deleteOrganizationRequest($id): Request
{
@@ -1338,6 +1348,7 @@ public function deleteOrganizationFollowerRequest($id, $follower_id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\OrganizationsDeleteResponse
+ * @deprecated
*/
public function deleteOrganizations($ids)
{
@@ -1355,6 +1366,7 @@ public function deleteOrganizations($ids)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\OrganizationsDeleteResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deleteOrganizationsWithHttpInfo($ids)
{
@@ -1455,6 +1467,7 @@ public function deleteOrganizationsWithHttpInfo($ids)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteOrganizationsAsync($ids): PromiseInterface
{
@@ -1475,6 +1488,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteOrganizationsAsyncWithHttpInfo($ids): PromiseInterface
{
@@ -1522,6 +1536,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deleteOrganizationsRequest($ids): Request
{
@@ -1634,6 +1649,7 @@ public function deleteOrganizationsRequest($ids): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\OrganizationDetailsGetResponse
+ * @deprecated
*/
public function getOrganization($id)
{
@@ -1651,6 +1667,7 @@ public function getOrganization($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\OrganizationDetailsGetResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getOrganizationWithHttpInfo($id)
{
@@ -1751,6 +1768,7 @@ public function getOrganizationWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationAsync($id): PromiseInterface
{
@@ -1771,6 +1789,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationAsyncWithHttpInfo($id): PromiseInterface
{
@@ -1818,6 +1837,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getOrganizationRequest($id): Request
{
@@ -1934,6 +1954,7 @@ public function getOrganizationRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ListActivitiesResponse
+ * @deprecated
*/
public function getOrganizationActivities($id, $start = 0, $limit = null, $done = null, $exclude = null)
{
@@ -1955,6 +1976,7 @@ public function getOrganizationActivities($id, $start = 0, $limit = null, $done
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ListActivitiesResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getOrganizationActivitiesWithHttpInfo($id, $start = 0, $limit = null, $done = null, $exclude = null)
{
@@ -2059,6 +2081,7 @@ public function getOrganizationActivitiesWithHttpInfo($id, $start = 0, $limit =
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationActivitiesAsync($id, $start = 0, $limit = null, $done = null, $exclude = null): PromiseInterface
{
@@ -2083,6 +2106,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationActivitiesAsyncWithHttpInfo($id, $start = 0, $limit = null, $done = null, $exclude = null): PromiseInterface
{
@@ -2134,6 +2158,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getOrganizationActivitiesRequest($id, $start = 0, $limit = null, $done = null, $exclude = null): Request
{
@@ -2605,6 +2630,7 @@ public function getOrganizationChangelogRequest($id, $cursor = null, $limit = nu
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ListDealsResponse
+ * @deprecated
*/
public function getOrganizationDeals($id, $start = 0, $limit = null, $status = 'all_not_deleted', $sort = null, $only_primary_association = null)
{
@@ -2627,6 +2653,7 @@ public function getOrganizationDeals($id, $start = 0, $limit = null, $status = '
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ListDealsResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getOrganizationDealsWithHttpInfo($id, $start = 0, $limit = null, $status = 'all_not_deleted', $sort = null, $only_primary_association = null)
{
@@ -2732,6 +2759,7 @@ public function getOrganizationDealsWithHttpInfo($id, $start = 0, $limit = null,
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationDealsAsync($id, $start = 0, $limit = null, $status = 'all_not_deleted', $sort = null, $only_primary_association = null): PromiseInterface
{
@@ -2757,6 +2785,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationDealsAsyncWithHttpInfo($id, $start = 0, $limit = null, $status = 'all_not_deleted', $sort = null, $only_primary_association = null): PromiseInterface
{
@@ -2809,6 +2838,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getOrganizationDealsRequest($id, $start = 0, $limit = null, $status = 'all_not_deleted', $sort = null, $only_primary_association = null): Request
{
@@ -3920,6 +3950,7 @@ public function getOrganizationMailMessagesRequest($id, $start = 0, $limit = nul
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ListPersonsResponse
+ * @deprecated
*/
public function getOrganizationPersons($id, $start = 0, $limit = null)
{
@@ -3939,6 +3970,7 @@ public function getOrganizationPersons($id, $start = 0, $limit = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ListPersonsResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getOrganizationPersonsWithHttpInfo($id, $start = 0, $limit = null)
{
@@ -4041,6 +4073,7 @@ public function getOrganizationPersonsWithHttpInfo($id, $start = 0, $limit = nul
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationPersonsAsync($id, $start = 0, $limit = null): PromiseInterface
{
@@ -4063,6 +4096,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationPersonsAsyncWithHttpInfo($id, $start = 0, $limit = null): PromiseInterface
{
@@ -4112,6 +4146,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getOrganizationPersonsRequest($id, $start = 0, $limit = null): Request
{
@@ -4889,6 +4924,7 @@ public function getOrganizationUsersRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\AllOrganizationsGetResponse
+ * @deprecated
*/
public function getOrganizations($user_id = null, $filter_id = null, $first_char = null, $start = 0, $limit = null, $sort = null)
{
@@ -4911,6 +4947,7 @@ public function getOrganizations($user_id = null, $filter_id = null, $first_char
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\AllOrganizationsGetResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getOrganizationsWithHttpInfo($user_id = null, $filter_id = null, $first_char = null, $start = 0, $limit = null, $sort = null)
{
@@ -5016,6 +5053,7 @@ public function getOrganizationsWithHttpInfo($user_id = null, $filter_id = null,
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationsAsync($user_id = null, $filter_id = null, $first_char = null, $start = 0, $limit = null, $sort = null): PromiseInterface
{
@@ -5041,6 +5079,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationsAsyncWithHttpInfo($user_id = null, $filter_id = null, $first_char = null, $start = 0, $limit = null, $sort = null): PromiseInterface
{
@@ -5093,6 +5132,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getOrganizationsRequest($user_id = null, $filter_id = null, $first_char = null, $start = 0, $limit = null, $sort = null): Request
{
@@ -5231,7 +5271,7 @@ public function getOrganizationsRequest($user_id = null, $filter_id = null, $fir
/**
* Operation getOrganizationsCollection
*
- * Get all organizations (BETA)
+ * Get all organizations collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -5243,6 +5283,7 @@ public function getOrganizationsRequest($user_id = null, $filter_id = null, $fir
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\InlineResponse200|\Pipedrive\versions\v1\Model\FailResponse
+ * @deprecated
*/
public function getOrganizationsCollection($cursor = null, $limit = null, $since = null, $until = null, $owner_id = null, $first_char = null)
{
@@ -5253,7 +5294,7 @@ public function getOrganizationsCollection($cursor = null, $limit = null, $since
/**
* Operation getOrganizationsCollectionWithHttpInfo
*
- * Get all organizations (BETA)
+ * Get all organizations collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -5265,6 +5306,7 @@ public function getOrganizationsCollection($cursor = null, $limit = null, $since
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\InlineResponse200|\Pipedrive\versions\v1\Model\FailResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getOrganizationsCollectionWithHttpInfo($cursor = null, $limit = null, $since = null, $until = null, $owner_id = null, $first_char = null)
{
@@ -5380,7 +5422,7 @@ public function getOrganizationsCollectionWithHttpInfo($cursor = null, $limit =
/**
* Operation getOrganizationsCollectionAsync
*
- * Get all organizations (BETA)
+ * Get all organizations collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -5391,6 +5433,7 @@ public function getOrganizationsCollectionWithHttpInfo($cursor = null, $limit =
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationsCollectionAsync($cursor = null, $limit = null, $since = null, $until = null, $owner_id = null, $first_char = null): PromiseInterface
{
@@ -5405,7 +5448,7 @@ function ($response) {
/**
* Operation getOrganizationsCollectionAsyncWithHttpInfo
*
- * Get all organizations (BETA)
+ * Get all organizations collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -5416,6 +5459,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getOrganizationsCollectionAsyncWithHttpInfo($cursor = null, $limit = null, $since = null, $until = null, $owner_id = null, $first_char = null): PromiseInterface
{
@@ -5468,6 +5512,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getOrganizationsCollectionRequest($cursor = null, $limit = null, $since = null, $until = null, $owner_id = null, $first_char = null): Request
{
@@ -5924,6 +5969,7 @@ public function mergeOrganizationsRequest($id, $merge_organizations_request = nu
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\OrganizationSearchResponse
+ * @deprecated
*/
public function searchOrganization($term, $fields = null, $exact_match = null, $start = 0, $limit = null)
{
@@ -5945,6 +5991,7 @@ public function searchOrganization($term, $fields = null, $exact_match = null, $
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\OrganizationSearchResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function searchOrganizationWithHttpInfo($term, $fields = null, $exact_match = null, $start = 0, $limit = null)
{
@@ -6049,6 +6096,7 @@ public function searchOrganizationWithHttpInfo($term, $fields = null, $exact_mat
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchOrganizationAsync($term, $fields = null, $exact_match = null, $start = 0, $limit = null): PromiseInterface
{
@@ -6073,6 +6121,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchOrganizationAsyncWithHttpInfo($term, $fields = null, $exact_match = null, $start = 0, $limit = null): PromiseInterface
{
@@ -6124,6 +6173,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function searchOrganizationRequest($term, $fields = null, $exact_match = null, $start = 0, $limit = null): Request
{
@@ -6269,6 +6319,7 @@ public function searchOrganizationRequest($term, $fields = null, $exact_match =
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\OrganizationUpdateResponse
+ * @deprecated
*/
public function updateOrganization($id, $update_organization = null)
{
@@ -6287,6 +6338,7 @@ public function updateOrganization($id, $update_organization = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\OrganizationUpdateResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function updateOrganizationWithHttpInfo($id, $update_organization = null)
{
@@ -6388,6 +6440,7 @@ public function updateOrganizationWithHttpInfo($id, $update_organization = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateOrganizationAsync($id, $update_organization = null): PromiseInterface
{
@@ -6409,6 +6462,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateOrganizationAsyncWithHttpInfo($id, $update_organization = null): PromiseInterface
{
@@ -6457,6 +6511,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function updateOrganizationRequest($id, $update_organization = null): Request
{
diff --git a/lib/versions/v1/Api/PersonsApi.php b/lib/versions/v1/Api/PersonsApi.php
index 868817a..3bede79 100644
--- a/lib/versions/v1/Api/PersonsApi.php
+++ b/lib/versions/v1/Api/PersonsApi.php
@@ -132,6 +132,7 @@ public function getConfig(): Configuration
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\AddPersonResponse
+ * @deprecated
*/
public function addPerson($new_person = null)
{
@@ -149,6 +150,7 @@ public function addPerson($new_person = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\AddPersonResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function addPersonWithHttpInfo($new_person = null)
{
@@ -249,6 +251,7 @@ public function addPersonWithHttpInfo($new_person = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addPersonAsync($new_person = null): PromiseInterface
{
@@ -269,6 +272,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addPersonAsyncWithHttpInfo($new_person = null): PromiseInterface
{
@@ -316,6 +320,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function addPersonRequest($new_person = null): Request
{
@@ -1083,6 +1088,7 @@ public function addPersonPictureRequest($id, $file, $crop_x = null, $crop_y = nu
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeletePersonResponse
+ * @deprecated
*/
public function deletePerson($id)
{
@@ -1100,6 +1106,7 @@ public function deletePerson($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeletePersonResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deletePersonWithHttpInfo($id)
{
@@ -1200,6 +1207,7 @@ public function deletePersonWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deletePersonAsync($id): PromiseInterface
{
@@ -1220,6 +1228,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deletePersonAsyncWithHttpInfo($id): PromiseInterface
{
@@ -1267,6 +1276,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deletePersonRequest($id): Request
{
@@ -1991,6 +2001,7 @@ public function deletePersonPictureRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeletePersonsInBulkResponse
+ * @deprecated
*/
public function deletePersons($ids)
{
@@ -2008,6 +2019,7 @@ public function deletePersons($ids)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeletePersonsInBulkResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deletePersonsWithHttpInfo($ids)
{
@@ -2108,6 +2120,7 @@ public function deletePersonsWithHttpInfo($ids)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deletePersonsAsync($ids): PromiseInterface
{
@@ -2128,6 +2141,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deletePersonsAsyncWithHttpInfo($ids): PromiseInterface
{
@@ -2175,6 +2189,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deletePersonsRequest($ids): Request
{
@@ -2287,6 +2302,7 @@ public function deletePersonsRequest($ids): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetPersonDetailsResponse
+ * @deprecated
*/
public function getPerson($id)
{
@@ -2304,6 +2320,7 @@ public function getPerson($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetPersonDetailsResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getPersonWithHttpInfo($id)
{
@@ -2404,6 +2421,7 @@ public function getPersonWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPersonAsync($id): PromiseInterface
{
@@ -2424,6 +2442,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPersonAsyncWithHttpInfo($id): PromiseInterface
{
@@ -2471,6 +2490,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getPersonRequest($id): Request
{
@@ -2587,6 +2607,7 @@ public function getPersonRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ListActivitiesResponse
+ * @deprecated
*/
public function getPersonActivities($id, $start = 0, $limit = null, $done = null, $exclude = null)
{
@@ -2608,6 +2629,7 @@ public function getPersonActivities($id, $start = 0, $limit = null, $done = null
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ListActivitiesResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getPersonActivitiesWithHttpInfo($id, $start = 0, $limit = null, $done = null, $exclude = null)
{
@@ -2712,6 +2734,7 @@ public function getPersonActivitiesWithHttpInfo($id, $start = 0, $limit = null,
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPersonActivitiesAsync($id, $start = 0, $limit = null, $done = null, $exclude = null): PromiseInterface
{
@@ -2736,6 +2759,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPersonActivitiesAsyncWithHttpInfo($id, $start = 0, $limit = null, $done = null, $exclude = null): PromiseInterface
{
@@ -2787,6 +2811,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getPersonActivitiesRequest($id, $start = 0, $limit = null, $done = null, $exclude = null): Request
{
@@ -3257,6 +3282,7 @@ public function getPersonChangelogRequest($id, $cursor = null, $limit = null): R
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ListDealsResponse
+ * @deprecated
*/
public function getPersonDeals($id, $start = 0, $limit = null, $status = 'all_not_deleted', $sort = null)
{
@@ -3278,6 +3304,7 @@ public function getPersonDeals($id, $start = 0, $limit = null, $status = 'all_no
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ListDealsResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getPersonDealsWithHttpInfo($id, $start = 0, $limit = null, $status = 'all_not_deleted', $sort = null)
{
@@ -3382,6 +3409,7 @@ public function getPersonDealsWithHttpInfo($id, $start = 0, $limit = null, $stat
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPersonDealsAsync($id, $start = 0, $limit = null, $status = 'all_not_deleted', $sort = null): PromiseInterface
{
@@ -3406,6 +3434,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPersonDealsAsyncWithHttpInfo($id, $start = 0, $limit = null, $status = 'all_not_deleted', $sort = null): PromiseInterface
{
@@ -3457,6 +3486,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getPersonDealsRequest($id, $start = 0, $limit = null, $status = 'all_not_deleted', $sort = null): Request
{
@@ -5529,6 +5559,7 @@ public function getPersonUsersRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetAllPersonsResponse
+ * @deprecated
*/
public function getPersons($user_id = null, $filter_id = null, $first_char = null, $start = 0, $limit = null, $sort = null)
{
@@ -5551,6 +5582,7 @@ public function getPersons($user_id = null, $filter_id = null, $first_char = nul
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetAllPersonsResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getPersonsWithHttpInfo($user_id = null, $filter_id = null, $first_char = null, $start = 0, $limit = null, $sort = null)
{
@@ -5656,6 +5688,7 @@ public function getPersonsWithHttpInfo($user_id = null, $filter_id = null, $firs
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPersonsAsync($user_id = null, $filter_id = null, $first_char = null, $start = 0, $limit = null, $sort = null): PromiseInterface
{
@@ -5681,6 +5714,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPersonsAsyncWithHttpInfo($user_id = null, $filter_id = null, $first_char = null, $start = 0, $limit = null, $sort = null): PromiseInterface
{
@@ -5733,6 +5767,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getPersonsRequest($user_id = null, $filter_id = null, $first_char = null, $start = 0, $limit = null, $sort = null): Request
{
@@ -5871,7 +5906,7 @@ public function getPersonsRequest($user_id = null, $filter_id = null, $first_cha
/**
* Operation getPersonsCollection
*
- * Get all persons (BETA)
+ * Get all persons collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -5883,6 +5918,7 @@ public function getPersonsRequest($user_id = null, $filter_id = null, $first_cha
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\InlineResponse2001|\Pipedrive\versions\v1\Model\FailResponse
+ * @deprecated
*/
public function getPersonsCollection($cursor = null, $limit = null, $since = null, $until = null, $owner_id = null, $first_char = null)
{
@@ -5893,7 +5929,7 @@ public function getPersonsCollection($cursor = null, $limit = null, $since = nul
/**
* Operation getPersonsCollectionWithHttpInfo
*
- * Get all persons (BETA)
+ * Get all persons collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -5905,6 +5941,7 @@ public function getPersonsCollection($cursor = null, $limit = null, $since = nul
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\InlineResponse2001|\Pipedrive\versions\v1\Model\FailResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getPersonsCollectionWithHttpInfo($cursor = null, $limit = null, $since = null, $until = null, $owner_id = null, $first_char = null)
{
@@ -6020,7 +6057,7 @@ public function getPersonsCollectionWithHttpInfo($cursor = null, $limit = null,
/**
* Operation getPersonsCollectionAsync
*
- * Get all persons (BETA)
+ * Get all persons collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -6031,6 +6068,7 @@ public function getPersonsCollectionWithHttpInfo($cursor = null, $limit = null,
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPersonsCollectionAsync($cursor = null, $limit = null, $since = null, $until = null, $owner_id = null, $first_char = null): PromiseInterface
{
@@ -6045,7 +6083,7 @@ function ($response) {
/**
* Operation getPersonsCollectionAsyncWithHttpInfo
*
- * Get all persons (BETA)
+ * Get all persons collection
*
* @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -6056,6 +6094,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPersonsCollectionAsyncWithHttpInfo($cursor = null, $limit = null, $since = null, $until = null, $owner_id = null, $first_char = null): PromiseInterface
{
@@ -6108,6 +6147,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getPersonsCollectionRequest($cursor = null, $limit = null, $since = null, $until = null, $owner_id = null, $first_char = null): Request
{
@@ -6566,6 +6606,7 @@ public function mergePersonsRequest($id, $merge_persons_request = null): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\PersonSearchResponse
+ * @deprecated
*/
public function searchPersons($term, $fields = null, $exact_match = null, $organization_id = null, $include_fields = null, $start = 0, $limit = null)
{
@@ -6589,6 +6630,7 @@ public function searchPersons($term, $fields = null, $exact_match = null, $organ
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\PersonSearchResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function searchPersonsWithHttpInfo($term, $fields = null, $exact_match = null, $organization_id = null, $include_fields = null, $start = 0, $limit = null)
{
@@ -6695,6 +6737,7 @@ public function searchPersonsWithHttpInfo($term, $fields = null, $exact_match =
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchPersonsAsync($term, $fields = null, $exact_match = null, $organization_id = null, $include_fields = null, $start = 0, $limit = null): PromiseInterface
{
@@ -6721,6 +6764,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchPersonsAsyncWithHttpInfo($term, $fields = null, $exact_match = null, $organization_id = null, $include_fields = null, $start = 0, $limit = null): PromiseInterface
{
@@ -6774,6 +6818,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function searchPersonsRequest($term, $fields = null, $exact_match = null, $organization_id = null, $include_fields = null, $start = 0, $limit = null): Request
{
diff --git a/lib/versions/v1/Api/PipelinesApi.php b/lib/versions/v1/Api/PipelinesApi.php
index 56560d3..a832079 100644
--- a/lib/versions/v1/Api/PipelinesApi.php
+++ b/lib/versions/v1/Api/PipelinesApi.php
@@ -132,6 +132,7 @@ public function getConfig(): Configuration
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\AddNewPipeline
+ * @deprecated
*/
public function addPipeline($pipeline = null)
{
@@ -149,6 +150,7 @@ public function addPipeline($pipeline = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\AddNewPipeline, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function addPipelineWithHttpInfo($pipeline = null)
{
@@ -249,6 +251,7 @@ public function addPipelineWithHttpInfo($pipeline = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addPipelineAsync($pipeline = null): PromiseInterface
{
@@ -269,6 +272,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addPipelineAsyncWithHttpInfo($pipeline = null): PromiseInterface
{
@@ -316,6 +320,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function addPipelineRequest($pipeline = null): Request
{
@@ -419,6 +424,7 @@ public function addPipelineRequest($pipeline = null): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeletePipelineResponse
+ * @deprecated
*/
public function deletePipeline($id)
{
@@ -436,6 +442,7 @@ public function deletePipeline($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeletePipelineResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deletePipelineWithHttpInfo($id)
{
@@ -536,6 +543,7 @@ public function deletePipelineWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deletePipelineAsync($id): PromiseInterface
{
@@ -556,6 +564,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deletePipelineAsyncWithHttpInfo($id): PromiseInterface
{
@@ -603,6 +612,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deletePipelineRequest($id): Request
{
@@ -716,6 +726,7 @@ public function deletePipelineRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetOnePipeline
+ * @deprecated
*/
public function getPipeline($id, $totals_convert_currency = null)
{
@@ -734,6 +745,7 @@ public function getPipeline($id, $totals_convert_currency = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetOnePipeline, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getPipelineWithHttpInfo($id, $totals_convert_currency = null)
{
@@ -835,6 +847,7 @@ public function getPipelineWithHttpInfo($id, $totals_convert_currency = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPipelineAsync($id, $totals_convert_currency = null): PromiseInterface
{
@@ -856,6 +869,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPipelineAsyncWithHttpInfo($id, $totals_convert_currency = null): PromiseInterface
{
@@ -904,6 +918,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getPipelineRequest($id, $totals_convert_currency = null): Request
{
@@ -1381,6 +1396,7 @@ public function getPipelineConversionStatisticsRequest($id, $start_date, $end_da
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetStageDeals
+ * @deprecated
*/
public function getPipelineDeals($id, $filter_id = null, $user_id = null, $everyone = null, $stage_id = null, $start = 0, $limit = null, $get_summary = null, $totals_convert_currency = null)
{
@@ -1406,6 +1422,7 @@ public function getPipelineDeals($id, $filter_id = null, $user_id = null, $every
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetStageDeals, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getPipelineDealsWithHttpInfo($id, $filter_id = null, $user_id = null, $everyone = null, $stage_id = null, $start = 0, $limit = null, $get_summary = null, $totals_convert_currency = null)
{
@@ -1514,6 +1531,7 @@ public function getPipelineDealsWithHttpInfo($id, $filter_id = null, $user_id =
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPipelineDealsAsync($id, $filter_id = null, $user_id = null, $everyone = null, $stage_id = null, $start = 0, $limit = null, $get_summary = null, $totals_convert_currency = null): PromiseInterface
{
@@ -1542,6 +1560,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPipelineDealsAsyncWithHttpInfo($id, $filter_id = null, $user_id = null, $everyone = null, $stage_id = null, $start = 0, $limit = null, $get_summary = null, $totals_convert_currency = null): PromiseInterface
{
@@ -1597,6 +1616,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getPipelineDealsRequest($id, $filter_id = null, $user_id = null, $everyone = null, $stage_id = null, $start = 0, $limit = null, $get_summary = null, $totals_convert_currency = null): Request
{
@@ -2121,6 +2141,7 @@ public function getPipelineMovementStatisticsRequest($id, $start_date, $end_date
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetAllPipelines
+ * @deprecated
*/
public function getPipelines()
{
@@ -2137,6 +2158,7 @@ public function getPipelines()
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetAllPipelines, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getPipelinesWithHttpInfo()
{
@@ -2236,6 +2258,7 @@ public function getPipelinesWithHttpInfo()
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPipelinesAsync(): PromiseInterface
{
@@ -2255,6 +2278,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getPipelinesAsyncWithHttpInfo(): PromiseInterface
{
@@ -2301,6 +2325,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getPipelinesRequest(): Request
{
@@ -2399,6 +2424,7 @@ public function getPipelinesRequest(): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\EditPipeline
+ * @deprecated
*/
public function updatePipeline($id, $pipeline = null)
{
@@ -2417,6 +2443,7 @@ public function updatePipeline($id, $pipeline = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\EditPipeline, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function updatePipelineWithHttpInfo($id, $pipeline = null)
{
@@ -2518,6 +2545,7 @@ public function updatePipelineWithHttpInfo($id, $pipeline = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updatePipelineAsync($id, $pipeline = null): PromiseInterface
{
@@ -2539,6 +2567,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updatePipelineAsyncWithHttpInfo($id, $pipeline = null): PromiseInterface
{
@@ -2587,6 +2616,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function updatePipelineRequest($id, $pipeline = null): Request
{
diff --git a/lib/versions/v1/Api/ProductsApi.php b/lib/versions/v1/Api/ProductsApi.php
index 0f3e23b..390b86b 100644
--- a/lib/versions/v1/Api/ProductsApi.php
+++ b/lib/versions/v1/Api/ProductsApi.php
@@ -132,6 +132,7 @@ public function getConfig(): Configuration
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ProductResponse
+ * @deprecated
*/
public function addProduct($add_product_request_body = null)
{
@@ -149,6 +150,7 @@ public function addProduct($add_product_request_body = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ProductResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function addProductWithHttpInfo($add_product_request_body = null)
{
@@ -249,6 +251,7 @@ public function addProductWithHttpInfo($add_product_request_body = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addProductAsync($add_product_request_body = null): PromiseInterface
{
@@ -269,6 +272,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addProductAsyncWithHttpInfo($add_product_request_body = null): PromiseInterface
{
@@ -316,6 +320,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function addProductRequest($add_product_request_body = null): Request
{
@@ -726,6 +731,7 @@ public function addProductFollowerRequest($id, $add_product_follower_request = n
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeleteProductResponse
+ * @deprecated
*/
public function deleteProduct($id)
{
@@ -743,6 +749,7 @@ public function deleteProduct($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeleteProductResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deleteProductWithHttpInfo($id)
{
@@ -843,6 +850,7 @@ public function deleteProductWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteProductAsync($id): PromiseInterface
{
@@ -863,6 +871,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteProductAsyncWithHttpInfo($id): PromiseInterface
{
@@ -910,6 +919,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deleteProductRequest($id): Request
{
@@ -1338,6 +1348,7 @@ public function deleteProductFollowerRequest($id, $follower_id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ProductResponse
+ * @deprecated
*/
public function getProduct($id)
{
@@ -1355,6 +1366,7 @@ public function getProduct($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ProductResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getProductWithHttpInfo($id)
{
@@ -1455,6 +1467,7 @@ public function getProductWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getProductAsync($id): PromiseInterface
{
@@ -1475,6 +1488,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getProductAsyncWithHttpInfo($id): PromiseInterface
{
@@ -1522,6 +1536,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getProductRequest($id): Request
{
@@ -2932,6 +2947,7 @@ public function getProductUsersRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ProductsResponse
+ * @deprecated
*/
public function getProducts($user_id = null, $filter_id = null, $ids = null, $first_char = null, $get_summary = null, $start = 0, $limit = null)
{
@@ -2955,6 +2971,7 @@ public function getProducts($user_id = null, $filter_id = null, $ids = null, $fi
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ProductsResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getProductsWithHttpInfo($user_id = null, $filter_id = null, $ids = null, $first_char = null, $get_summary = null, $start = 0, $limit = null)
{
@@ -3061,6 +3078,7 @@ public function getProductsWithHttpInfo($user_id = null, $filter_id = null, $ids
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getProductsAsync($user_id = null, $filter_id = null, $ids = null, $first_char = null, $get_summary = null, $start = 0, $limit = null): PromiseInterface
{
@@ -3087,6 +3105,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getProductsAsyncWithHttpInfo($user_id = null, $filter_id = null, $ids = null, $first_char = null, $get_summary = null, $start = 0, $limit = null): PromiseInterface
{
@@ -3140,6 +3159,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getProductsRequest($user_id = null, $filter_id = null, $ids = null, $first_char = null, $get_summary = null, $start = 0, $limit = null): Request
{
@@ -3298,6 +3318,7 @@ public function getProductsRequest($user_id = null, $filter_id = null, $ids = nu
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\ProductSearchResponse
+ * @deprecated
*/
public function searchProducts($term, $fields = null, $exact_match = null, $include_fields = null, $start = 0, $limit = null)
{
@@ -3320,6 +3341,7 @@ public function searchProducts($term, $fields = null, $exact_match = null, $incl
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\ProductSearchResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function searchProductsWithHttpInfo($term, $fields = null, $exact_match = null, $include_fields = null, $start = 0, $limit = null)
{
@@ -3425,6 +3447,7 @@ public function searchProductsWithHttpInfo($term, $fields = null, $exact_match =
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchProductsAsync($term, $fields = null, $exact_match = null, $include_fields = null, $start = 0, $limit = null): PromiseInterface
{
@@ -3450,6 +3473,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function searchProductsAsyncWithHttpInfo($term, $fields = null, $exact_match = null, $include_fields = null, $start = 0, $limit = null): PromiseInterface
{
@@ -3502,6 +3526,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function searchProductsRequest($term, $fields = null, $exact_match = null, $include_fields = null, $start = 0, $limit = null): Request
{
@@ -3655,6 +3680,7 @@ public function searchProductsRequest($term, $fields = null, $exact_match = null
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\UpdateProductResponse
+ * @deprecated
*/
public function updateProduct($id, $update_product_request_body = null)
{
@@ -3673,6 +3699,7 @@ public function updateProduct($id, $update_product_request_body = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\UpdateProductResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function updateProductWithHttpInfo($id, $update_product_request_body = null)
{
@@ -3774,6 +3801,7 @@ public function updateProductWithHttpInfo($id, $update_product_request_body = nu
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateProductAsync($id, $update_product_request_body = null): PromiseInterface
{
@@ -3795,6 +3823,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateProductAsyncWithHttpInfo($id, $update_product_request_body = null): PromiseInterface
{
@@ -3843,6 +3872,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function updateProductRequest($id, $update_product_request_body = null): Request
{
diff --git a/lib/versions/v1/Api/StagesApi.php b/lib/versions/v1/Api/StagesApi.php
index 07ed2c7..2d46d59 100644
--- a/lib/versions/v1/Api/StagesApi.php
+++ b/lib/versions/v1/Api/StagesApi.php
@@ -132,6 +132,7 @@ public function getConfig(): Configuration
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetAddUpdateStage
+ * @deprecated
*/
public function addStage($stage = null)
{
@@ -149,6 +150,7 @@ public function addStage($stage = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetAddUpdateStage, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function addStageWithHttpInfo($stage = null)
{
@@ -249,6 +251,7 @@ public function addStageWithHttpInfo($stage = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addStageAsync($stage = null): PromiseInterface
{
@@ -269,6 +272,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function addStageAsyncWithHttpInfo($stage = null): PromiseInterface
{
@@ -316,6 +320,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function addStageRequest($stage = null): Request
{
@@ -419,6 +424,7 @@ public function addStageRequest($stage = null): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeleteStageResponse
+ * @deprecated
*/
public function deleteStage($id)
{
@@ -436,6 +442,7 @@ public function deleteStage($id)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeleteStageResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deleteStageWithHttpInfo($id)
{
@@ -536,6 +543,7 @@ public function deleteStageWithHttpInfo($id)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteStageAsync($id): PromiseInterface
{
@@ -556,6 +564,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteStageAsyncWithHttpInfo($id): PromiseInterface
{
@@ -603,6 +612,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deleteStageRequest($id): Request
{
@@ -715,6 +725,7 @@ public function deleteStageRequest($id): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\DeleteStagesResponse
+ * @deprecated
*/
public function deleteStages($ids)
{
@@ -732,6 +743,7 @@ public function deleteStages($ids)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\DeleteStagesResponse, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function deleteStagesWithHttpInfo($ids)
{
@@ -832,6 +844,7 @@ public function deleteStagesWithHttpInfo($ids)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteStagesAsync($ids): PromiseInterface
{
@@ -852,6 +865,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function deleteStagesAsyncWithHttpInfo($ids): PromiseInterface
{
@@ -899,6 +913,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function deleteStagesRequest($ids): Request
{
@@ -1012,6 +1027,7 @@ public function deleteStagesRequest($ids): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetOneStage
+ * @deprecated
*/
public function getStage($id, $everyone = null)
{
@@ -1030,6 +1046,7 @@ public function getStage($id, $everyone = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetOneStage, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getStageWithHttpInfo($id, $everyone = null)
{
@@ -1131,6 +1148,7 @@ public function getStageWithHttpInfo($id, $everyone = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getStageAsync($id, $everyone = null): PromiseInterface
{
@@ -1152,6 +1170,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getStageAsyncWithHttpInfo($id, $everyone = null): PromiseInterface
{
@@ -1200,6 +1219,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getStageRequest($id, $everyone = null): Request
{
@@ -1325,6 +1345,7 @@ public function getStageRequest($id, $everyone = null): Request
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetStageDeals
+ * @deprecated
*/
public function getStageDeals($id, $filter_id = null, $user_id = null, $everyone = null, $start = 0, $limit = null)
{
@@ -1347,6 +1368,7 @@ public function getStageDeals($id, $filter_id = null, $user_id = null, $everyone
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetStageDeals, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getStageDealsWithHttpInfo($id, $filter_id = null, $user_id = null, $everyone = null, $start = 0, $limit = null)
{
@@ -1452,6 +1474,7 @@ public function getStageDealsWithHttpInfo($id, $filter_id = null, $user_id = nul
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getStageDealsAsync($id, $filter_id = null, $user_id = null, $everyone = null, $start = 0, $limit = null): PromiseInterface
{
@@ -1477,6 +1500,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getStageDealsAsyncWithHttpInfo($id, $filter_id = null, $user_id = null, $everyone = null, $start = 0, $limit = null): PromiseInterface
{
@@ -1529,6 +1553,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getStageDealsRequest($id, $filter_id = null, $user_id = null, $everyone = null, $start = 0, $limit = null): Request
{
@@ -1683,6 +1708,7 @@ public function getStageDealsRequest($id, $filter_id = null, $user_id = null, $e
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetStages
+ * @deprecated
*/
public function getStages($pipeline_id = null, $start = 0, $limit = null)
{
@@ -1702,6 +1728,7 @@ public function getStages($pipeline_id = null, $start = 0, $limit = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetStages, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function getStagesWithHttpInfo($pipeline_id = null, $start = 0, $limit = null)
{
@@ -1804,6 +1831,7 @@ public function getStagesWithHttpInfo($pipeline_id = null, $start = 0, $limit =
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getStagesAsync($pipeline_id = null, $start = 0, $limit = null): PromiseInterface
{
@@ -1826,6 +1854,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function getStagesAsyncWithHttpInfo($pipeline_id = null, $start = 0, $limit = null): PromiseInterface
{
@@ -1875,6 +1904,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function getStagesRequest($pipeline_id = null, $start = 0, $limit = null): Request
{
@@ -1997,6 +2027,7 @@ public function getStagesRequest($pipeline_id = null, $start = 0, $limit = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v1\Model\GetAddUpdateStage
+ * @deprecated
*/
public function updateStage($id, $update_stage_request = null)
{
@@ -2015,6 +2046,7 @@ public function updateStage($id, $update_stage_request = null)
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v1\Model\GetAddUpdateStage, HTTP status code, HTTP response headers (array of strings)
+ * @deprecated
*/
public function updateStageWithHttpInfo($id, $update_stage_request = null)
{
@@ -2116,6 +2148,7 @@ public function updateStageWithHttpInfo($id, $update_stage_request = null)
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateStageAsync($id, $update_stage_request = null): PromiseInterface
{
@@ -2137,6 +2170,7 @@ function ($response) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
+ * @deprecated
*/
public function updateStageAsyncWithHttpInfo($id, $update_stage_request = null): PromiseInterface
{
@@ -2185,6 +2219,7 @@ function ($exception) {
*
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
+ * @deprecated
*/
public function updateStageRequest($id, $update_stage_request = null): Request
{
diff --git a/lib/versions/v1/Model/DealSearchItemItem.php b/lib/versions/v1/Model/DealSearchItemItem.php
index 3087783..59fdfaa 100644
--- a/lib/versions/v1/Model/DealSearchItemItem.php
+++ b/lib/versions/v1/Model/DealSearchItemItem.php
@@ -78,7 +78,8 @@ class DealSearchItemItem implements ModelInterface, ArrayAccess, JsonSerializabl
'person' => '\Pipedrive\versions\v1\Model\DealSearchItemItemPerson',
'organization' => '\Pipedrive\versions\v1\Model\DealSearchItemItemOrganization',
'custom_fields' => 'string[]',
- 'notes' => 'string[]'
+ 'notes' => 'string[]',
+ 'is_archived' => 'bool'
];
/**
@@ -101,7 +102,8 @@ class DealSearchItemItem implements ModelInterface, ArrayAccess, JsonSerializabl
'person' => null,
'organization' => null,
'custom_fields' => null,
- 'notes' => null
+ 'notes' => null,
+ 'is_archived' => null
];
/**
@@ -147,7 +149,8 @@ public static function openAPIFormats(): array
'person' => 'person',
'organization' => 'organization',
'custom_fields' => 'custom_fields',
- 'notes' => 'notes'
+ 'notes' => 'notes',
+ 'is_archived' => 'is_archived'
];
/**
@@ -168,7 +171,8 @@ public static function openAPIFormats(): array
'person' => 'setPerson',
'organization' => 'setOrganization',
'custom_fields' => 'setCustomFields',
- 'notes' => 'setNotes'
+ 'notes' => 'setNotes',
+ 'is_archived' => 'setIsArchived'
];
/**
@@ -189,7 +193,8 @@ public static function openAPIFormats(): array
'person' => 'getPerson',
'organization' => 'getOrganization',
'custom_fields' => 'getCustomFields',
- 'notes' => 'getNotes'
+ 'notes' => 'getNotes',
+ 'is_archived' => 'getIsArchived'
];
/**
@@ -272,6 +277,7 @@ public function __construct(array $data = null)
$this->container['organization'] = $data['organization'] ?? null;
$this->container['custom_fields'] = $data['custom_fields'] ?? null;
$this->container['notes'] = $data['notes'] ?? null;
+ $this->container['is_archived'] = $data['is_archived'] ?? null;
}
/**
@@ -611,6 +617,30 @@ public function setNotes($notes): self
return $this;
}
+
+ /**
+ * Gets is_archived
+ *
+ * @return bool|null
+ */
+ public function getIsArchived()
+ {
+ return $this->container['is_archived'];
+ }
+
+ /**
+ * Sets is_archived
+ *
+ * @param bool|null $is_archived A flag indicating whether the deal is archived or not
+ *
+ * @return self
+ */
+ public function setIsArchived($is_archived): self
+ {
+ $this->container['is_archived'] = $is_archived;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*
diff --git a/lib/versions/v2/Api/ActivitiesApi.php b/lib/versions/v2/Api/ActivitiesApi.php
index eee6577..6e214eb 100644
--- a/lib/versions/v2/Api/ActivitiesApi.php
+++ b/lib/versions/v2/Api/ActivitiesApi.php
@@ -717,9 +717,10 @@ public function deleteActivityRequest($id): Request
* @param string|null $lead_id If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. (optional)
* @param int|null $person_id If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored. (optional)
* @param int|null $org_id If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param bool|null $done If supplied, only activities with specified 'done' flag value are returned (optional)
* @param string|null $updated_since If set, only activities 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 string|null $updated_until If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional)
- * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`. (optional, default to 'id')
+ * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`. (optional, default to 'id')
* @param string|'asc' $sort_direction The sorting direction. Supported values: `asc`, `desc`. (optional, default to 'asc')
* @param string|null $include_fields Optional comma separated string array of additional fields to include (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -729,9 +730,9 @@ public function deleteActivityRequest($id): Request
* @throws InvalidArgumentException|GuzzleException
* @return \Pipedrive\versions\v2\Model\GetActivities
*/
- public function getActivities($filter_id = null, $ids = null, $owner_id = null, $deal_id = null, $lead_id = null, $person_id = null, $org_id = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $limit = null, $cursor = null)
+ public function getActivities($filter_id = null, $ids = null, $owner_id = null, $deal_id = null, $lead_id = null, $person_id = null, $org_id = null, $done = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $limit = null, $cursor = null)
{
- list($response) = $this->getActivitiesWithHttpInfo($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor);
+ list($response) = $this->getActivitiesWithHttpInfo($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $done, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor);
return $response;
}
@@ -747,9 +748,10 @@ public function getActivities($filter_id = null, $ids = null, $owner_id = null,
* @param string|null $lead_id If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. (optional)
* @param int|null $person_id If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored. (optional)
* @param int|null $org_id If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param bool|null $done If supplied, only activities with specified 'done' flag value are returned (optional)
* @param string|null $updated_since If set, only activities 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 string|null $updated_until If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional)
- * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`. (optional, default to 'id')
+ * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`. (optional, default to 'id')
* @param string|'asc' $sort_direction The sorting direction. Supported values: `asc`, `desc`. (optional, default to 'asc')
* @param string|null $include_fields Optional comma separated string array of additional fields to include (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -759,9 +761,9 @@ public function getActivities($filter_id = null, $ids = null, $owner_id = null,
* @throws InvalidArgumentException|GuzzleException
* @return array of \Pipedrive\versions\v2\Model\GetActivities, HTTP status code, HTTP response headers (array of strings)
*/
- public function getActivitiesWithHttpInfo($filter_id = null, $ids = null, $owner_id = null, $deal_id = null, $lead_id = null, $person_id = null, $org_id = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $limit = null, $cursor = null)
+ public function getActivitiesWithHttpInfo($filter_id = null, $ids = null, $owner_id = null, $deal_id = null, $lead_id = null, $person_id = null, $org_id = null, $done = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $limit = null, $cursor = null)
{
- $request = $this->getActivitiesRequest($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor);
+ $request = $this->getActivitiesRequest($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $done, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor);
try {
$options = $this->createHttpClientOption();
@@ -770,7 +772,7 @@ public function getActivitiesWithHttpInfo($filter_id = null, $ids = null, $owner
} catch (RequestException $e) {
if ($e->getCode() === 401 && $this->config->isRefreshPossible()) {
$this->config->refreshToken();
- $request = $this->getActivitiesRequest($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor);
+ $request = $this->getActivitiesRequest($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $done, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor);
$response = $this->client->send($request, $options);
} else {
throw new ApiException(
@@ -861,9 +863,10 @@ public function getActivitiesWithHttpInfo($filter_id = null, $ids = null, $owner
* @param string|null $lead_id If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. (optional)
* @param int|null $person_id If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored. (optional)
* @param int|null $org_id If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param bool|null $done If supplied, only activities with specified 'done' flag value are returned (optional)
* @param string|null $updated_since If set, only activities 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 string|null $updated_until If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional)
- * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`. (optional, default to 'id')
+ * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`. (optional, default to 'id')
* @param string|'asc' $sort_direction The sorting direction. Supported values: `asc`, `desc`. (optional, default to 'asc')
* @param string|null $include_fields Optional comma separated string array of additional fields to include (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -872,9 +875,9 @@ public function getActivitiesWithHttpInfo($filter_id = null, $ids = null, $owner
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
*/
- public function getActivitiesAsync($filter_id = null, $ids = null, $owner_id = null, $deal_id = null, $lead_id = null, $person_id = null, $org_id = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $limit = null, $cursor = null): PromiseInterface
+ public function getActivitiesAsync($filter_id = null, $ids = null, $owner_id = null, $deal_id = null, $lead_id = null, $person_id = null, $org_id = null, $done = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $limit = null, $cursor = null): PromiseInterface
{
- return $this->getActivitiesAsyncWithHttpInfo($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor)
+ return $this->getActivitiesAsyncWithHttpInfo($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $done, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor)
->then(
function ($response) {
return $response[0];
@@ -894,9 +897,10 @@ function ($response) {
* @param string|null $lead_id If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. (optional)
* @param int|null $person_id If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored. (optional)
* @param int|null $org_id If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param bool|null $done If supplied, only activities with specified 'done' flag value are returned (optional)
* @param string|null $updated_since If set, only activities 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 string|null $updated_until If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional)
- * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`. (optional, default to 'id')
+ * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`. (optional, default to 'id')
* @param string|'asc' $sort_direction The sorting direction. Supported values: `asc`, `desc`. (optional, default to 'asc')
* @param string|null $include_fields Optional comma separated string array of additional fields to include (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -905,10 +909,10 @@ function ($response) {
* @throws InvalidArgumentException|OAuthProviderException
* @return PromiseInterface
*/
- public function getActivitiesAsyncWithHttpInfo($filter_id = null, $ids = null, $owner_id = null, $deal_id = null, $lead_id = null, $person_id = null, $org_id = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $limit = null, $cursor = null): PromiseInterface
+ public function getActivitiesAsyncWithHttpInfo($filter_id = null, $ids = null, $owner_id = null, $deal_id = null, $lead_id = null, $person_id = null, $org_id = null, $done = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $limit = null, $cursor = null): PromiseInterface
{
$returnType = '\Pipedrive\versions\v2\Model\GetActivities';
- $request = $this->getActivitiesRequest($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor);
+ $request = $this->getActivitiesRequest($filter_id, $ids, $owner_id, $deal_id, $lead_id, $person_id, $org_id, $done, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $limit, $cursor);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -954,9 +958,10 @@ function ($exception) {
* @param string|null $lead_id If supplied, only activities linked to the specified lead are returned. If filter_id is provided, this is ignored. (optional)
* @param int|null $person_id If supplied, only activities whose primary participant is the given person are returned. If filter_id is provided, this is ignored. (optional)
* @param int|null $org_id If supplied, only activities linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param bool|null $done If supplied, only activities with specified 'done' flag value are returned (optional)
* @param string|null $updated_since If set, only activities 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 string|null $updated_until If set, only activities with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional)
- * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`. (optional, default to 'id')
+ * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`, `due_date`. (optional, default to 'id')
* @param string|'asc' $sort_direction The sorting direction. Supported values: `asc`, `desc`. (optional, default to 'asc')
* @param string|null $include_fields Optional comma separated string array of additional fields to include (optional)
* @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
@@ -965,7 +970,7 @@ function ($exception) {
* @throws InvalidArgumentException|OAuthProviderException
* @return Request
*/
- public function getActivitiesRequest($filter_id = null, $ids = null, $owner_id = null, $deal_id = null, $lead_id = null, $person_id = null, $org_id = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $limit = null, $cursor = null): Request
+ public function getActivitiesRequest($filter_id = null, $ids = null, $owner_id = null, $deal_id = null, $lead_id = null, $person_id = null, $org_id = null, $done = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $limit = null, $cursor = null): Request
{
$resourcePath = '/activities';
@@ -1033,6 +1038,14 @@ public function getActivitiesRequest($filter_id = null, $ids = null, $owner_id =
}
// query params
/* @phpstan-ignore-next-line */
+ if (is_array($done)) {
+ $done = ObjectSerializer::serializeCollection($done, '', true);
+ }
+ if ($done !== null) {
+ $queryParams['done'] = $done;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
if (is_array($updated_since)) {
$updated_since = ObjectSerializer::serializeCollection($updated_since, '', true);
}
diff --git a/lib/versions/v2/Api/DealsApi.php b/lib/versions/v2/Api/DealsApi.php
index 8615557..f7ae093 100644
--- a/lib/versions/v2/Api/DealsApi.php
+++ b/lib/versions/v2/Api/DealsApi.php
@@ -2807,6 +2807,490 @@ public function getAdditionalDiscountsRequest($id): Request
}
+ /* @phpstan-ignore-next-line */
+ if ($multipart) {
+ $headers = $this->headerSelector->selectHeadersForMultipart(
+ ['application/json']
+ );
+ } else {
+ $headers = $this->headerSelector->selectHeaders(
+ ['application/json'],
+ []
+ );
+ }
+
+ // for model (json/xml)
+ if (count($formParams) > 0) {
+ /* @phpstan-ignore-next-line */
+ if ($multipart) {
+ $multipartContents = [];
+ foreach ($formParams as $formParamName => $formParamValue) {
+ $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
+ foreach ($formParamValueItems as $formParamValueItem) {
+ $multipartContents[] = [
+ 'name' => $formParamName,
+ 'contents' => $formParamValueItem
+ ];
+ }
+ }
+ // for HTTP post (form)
+ $httpBody = new MultipartStream($multipartContents);
+
+ } elseif ($headers['Content-Type'] === 'application/json') {
+ $httpBody = Utils::jsonEncode($formParams);
+
+ } else {
+ // for HTTP post (form)
+ $httpBody = Query::build($formParams);
+ }
+ }
+
+ // this endpoint requires API key authentication
+ $apiKey = $this->config->getApiKeyWithPrefix('api_token');
+ if ($apiKey !== null) {
+ $queryParams['api_token'] = $apiKey;
+ }
+ // this endpoint requires OAuth (access token)
+ if ($this->config->getAccessToken() !== null) {
+ // If access token is expired
+ if ($this->config->isRefreshPossible() && $this->config->getExpiresAt() <= time()) {
+ $this->config->refreshToken();
+ }
+ $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
+ }
+
+ $defaultHeaders = [];
+ if ($this->config->getUserAgent()) {
+ $defaultHeaders['User-Agent'] = $this->config->getUserAgent();
+ }
+
+ $headers = array_merge(
+ $defaultHeaders,
+ $headerParams,
+ $headers
+ );
+
+ $query = Query::build($queryParams);
+ return new Request(
+ 'GET',
+ $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
+ $headers,
+ $httpBody
+ );
+ }
+
+ /**
+ * Operation getArchivedDeals
+ *
+ * Get all archived deals
+ *
+ * @param int|null $filter_id If supplied, only deals matching the specified filter are returned (optional)
+ * @param string|null $ids Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. (optional)
+ * @param int|null $owner_id If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $person_id If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $org_id If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $pipeline_id If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $stage_id If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. (optional)
+ * @param string|null $status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. (optional)
+ * @param string|null $updated_since If set, only deals 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 string|null $updated_until If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional)
+ * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`. (optional, default to 'id')
+ * @param string|'asc' $sort_direction The sorting direction. Supported values: `asc`, `desc`. (optional, default to 'asc')
+ * @param string|null $include_fields Optional comma separated string array of additional fields to include (optional)
+ * @param string|null $custom_fields Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. (optional)
+ * @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
+ * @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
+ *
+ * @throws ApiException on non-2xx response
+ * @throws InvalidArgumentException|GuzzleException
+ * @return \Pipedrive\versions\v2\Model\GetDeals
+ */
+ public function getArchivedDeals($filter_id = null, $ids = null, $owner_id = null, $person_id = null, $org_id = null, $pipeline_id = null, $stage_id = null, $status = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $custom_fields = null, $limit = null, $cursor = null)
+ {
+ list($response) = $this->getArchivedDealsWithHttpInfo($filter_id, $ids, $owner_id, $person_id, $org_id, $pipeline_id, $stage_id, $status, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $custom_fields, $limit, $cursor);
+ return $response;
+ }
+
+ /**
+ * Operation getArchivedDealsWithHttpInfo
+ *
+ * Get all archived deals
+ *
+ * @param int|null $filter_id If supplied, only deals matching the specified filter are returned (optional)
+ * @param string|null $ids Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. (optional)
+ * @param int|null $owner_id If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $person_id If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $org_id If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $pipeline_id If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $stage_id If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. (optional)
+ * @param string|null $status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. (optional)
+ * @param string|null $updated_since If set, only deals 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 string|null $updated_until If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional)
+ * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`. (optional, default to 'id')
+ * @param string|'asc' $sort_direction The sorting direction. Supported values: `asc`, `desc`. (optional, default to 'asc')
+ * @param string|null $include_fields Optional comma separated string array of additional fields to include (optional)
+ * @param string|null $custom_fields Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. (optional)
+ * @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
+ * @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
+ *
+ * @throws ApiException on non-2xx response
+ * @throws InvalidArgumentException|GuzzleException
+ * @return array of \Pipedrive\versions\v2\Model\GetDeals, HTTP status code, HTTP response headers (array of strings)
+ */
+ public function getArchivedDealsWithHttpInfo($filter_id = null, $ids = null, $owner_id = null, $person_id = null, $org_id = null, $pipeline_id = null, $stage_id = null, $status = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $custom_fields = null, $limit = null, $cursor = null)
+ {
+ $request = $this->getArchivedDealsRequest($filter_id, $ids, $owner_id, $person_id, $org_id, $pipeline_id, $stage_id, $status, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $custom_fields, $limit, $cursor);
+
+ try {
+ $options = $this->createHttpClientOption();
+ try {
+ $response = $this->client->send($request, $options);
+ } catch (RequestException $e) {
+ if ($e->getCode() === 401 && $this->config->isRefreshPossible()) {
+ $this->config->refreshToken();
+ $request = $this->getArchivedDealsRequest($filter_id, $ids, $owner_id, $person_id, $org_id, $pipeline_id, $stage_id, $status, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $custom_fields, $limit, $cursor);
+ $response = $this->client->send($request, $options);
+ } else {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ $e->getResponse() ? $e->getResponse()->getHeaders() : null,
+ $e->getResponse() ? (string) $e->getResponse()->getBody() : null
+ );
+ }
+ } catch (ConnectException $e) {
+ throw new ApiException(
+ "[{$e->getCode()}] {$e->getMessage()}",
+ (int) $e->getCode(),
+ null,
+ null
+ );
+ }
+
+ $statusCode = $response->getStatusCode();
+
+
+ switch($statusCode) {
+ case 200:
+ /* @phpstan-ignore-next-line */
+ if ('\Pipedrive\versions\v2\Model\GetDeals' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Pipedrive\versions\v2\Model\GetDeals', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ }
+
+ 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()
+ );
+ }
+
+ /* @phpstan-ignore-next-line */
+ if ('\Pipedrive\versions\v2\Model\GetDeals' === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, '\Pipedrive\versions\v2\Model\GetDeals', []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+
+ } catch (ApiException $e) {
+ switch ($e->getCode()) {
+ case 200:
+ $data = ObjectSerializer::deserialize(
+ $e->getResponseBody(),
+ '\Pipedrive\versions\v2\Model\GetDeals',
+ $e->getResponseHeaders()
+ );
+ $e->setResponseObject($data);
+ break;
+ }
+ throw $e;
+ }
+ }
+
+ /**
+ * Operation getArchivedDealsAsync
+ *
+ * Get all archived deals
+ *
+ * @param int|null $filter_id If supplied, only deals matching the specified filter are returned (optional)
+ * @param string|null $ids Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. (optional)
+ * @param int|null $owner_id If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $person_id If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $org_id If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $pipeline_id If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $stage_id If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. (optional)
+ * @param string|null $status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. (optional)
+ * @param string|null $updated_since If set, only deals 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 string|null $updated_until If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional)
+ * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`. (optional, default to 'id')
+ * @param string|'asc' $sort_direction The sorting direction. Supported values: `asc`, `desc`. (optional, default to 'asc')
+ * @param string|null $include_fields Optional comma separated string array of additional fields to include (optional)
+ * @param string|null $custom_fields Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. (optional)
+ * @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
+ * @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return PromiseInterface
+ */
+ public function getArchivedDealsAsync($filter_id = null, $ids = null, $owner_id = null, $person_id = null, $org_id = null, $pipeline_id = null, $stage_id = null, $status = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $custom_fields = null, $limit = null, $cursor = null): PromiseInterface
+ {
+ return $this->getArchivedDealsAsyncWithHttpInfo($filter_id, $ids, $owner_id, $person_id, $org_id, $pipeline_id, $stage_id, $status, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $custom_fields, $limit, $cursor)
+ ->then(
+ function ($response) {
+ return $response[0];
+ }
+ );
+ }
+
+ /**
+ * Operation getArchivedDealsAsyncWithHttpInfo
+ *
+ * Get all archived deals
+ *
+ * @param int|null $filter_id If supplied, only deals matching the specified filter are returned (optional)
+ * @param string|null $ids Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. (optional)
+ * @param int|null $owner_id If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $person_id If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $org_id If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $pipeline_id If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $stage_id If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. (optional)
+ * @param string|null $status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. (optional)
+ * @param string|null $updated_since If set, only deals 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 string|null $updated_until If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional)
+ * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`. (optional, default to 'id')
+ * @param string|'asc' $sort_direction The sorting direction. Supported values: `asc`, `desc`. (optional, default to 'asc')
+ * @param string|null $include_fields Optional comma separated string array of additional fields to include (optional)
+ * @param string|null $custom_fields Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. (optional)
+ * @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
+ * @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return PromiseInterface
+ */
+ public function getArchivedDealsAsyncWithHttpInfo($filter_id = null, $ids = null, $owner_id = null, $person_id = null, $org_id = null, $pipeline_id = null, $stage_id = null, $status = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $custom_fields = null, $limit = null, $cursor = null): PromiseInterface
+ {
+ $returnType = '\Pipedrive\versions\v2\Model\GetDeals';
+ $request = $this->getArchivedDealsRequest($filter_id, $ids, $owner_id, $person_id, $org_id, $pipeline_id, $stage_id, $status, $updated_since, $updated_until, $sort_by, $sort_direction, $include_fields, $custom_fields, $limit, $cursor);
+
+ return $this->client
+ ->sendAsync($request, $this->createHttpClientOption())
+ ->then(
+ function ($response) use ($returnType) {
+ /* @phpstan-ignore-next-line */
+ if ($returnType === '\SplFileObject') {
+ $content = $response->getBody(); //stream goes to serializer
+ } else {
+ $content = (string) $response->getBody();
+ }
+
+ return [
+ ObjectSerializer::deserialize($content, $returnType, []),
+ $response->getStatusCode(),
+ $response->getHeaders()
+ ];
+ },
+ function ($exception) {
+ $response = $exception->getResponse();
+ $statusCode = $response->getStatusCode();
+ throw new ApiException(
+ sprintf(
+ '[%d] Error connecting to the API (%s)',
+ $statusCode,
+ $exception->getRequest()->getUri()
+ ),
+ $statusCode,
+ $response->getHeaders(),
+ (string) $response->getBody()
+ );
+ }
+ );
+ }
+
+ /**
+ * Create request for operation 'getArchivedDeals'
+ *
+ * @param int|null $filter_id If supplied, only deals matching the specified filter are returned (optional)
+ * @param string|null $ids Optional comma separated string array of up to 100 entity ids to fetch. If filter_id is provided, this is ignored. If any of the requested entities do not exist or are not visible, they are not included in the response. (optional)
+ * @param int|null $owner_id If supplied, only deals owned by the specified user are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $person_id If supplied, only deals linked to the specified person are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $org_id If supplied, only deals linked to the specified organization are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $pipeline_id If supplied, only deals in the specified pipeline are returned. If filter_id is provided, this is ignored. (optional)
+ * @param int|null $stage_id If supplied, only deals in the specified stage are returned. If filter_id is provided, this is ignored. (optional)
+ * @param string|null $status Only fetch deals with a specific status. If omitted, all not deleted deals are returned. If set to deleted, deals that have been deleted up to 30 days ago will be included. Multiple statuses can be included as a comma separated array. If filter_id is provided, this is ignored. (optional)
+ * @param string|null $updated_since If set, only deals 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 string|null $updated_until If set, only deals with an `update_time` earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. (optional)
+ * @param string|'id' $sort_by The field to sort by. Supported fields: `id`, `update_time`, `add_time`. (optional, default to 'id')
+ * @param string|'asc' $sort_direction The sorting direction. Supported values: `asc`, `desc`. (optional, default to 'asc')
+ * @param string|null $include_fields Optional comma separated string array of additional fields to include (optional)
+ * @param string|null $custom_fields Optional comma separated string array of custom fields keys to include. If you are only interested in a particular set of custom fields, please use this parameter for faster results and smaller response.<br/>A maximum of 15 keys is allowed. (optional)
+ * @param int|null $limit For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Please note that a maximum value of 500 is allowed. (optional)
+ * @param string|null $cursor For pagination, the marker (an opaque string value) representing the first item on the next page (optional)
+ *
+ * @throws InvalidArgumentException|OAuthProviderException
+ * @return Request
+ */
+ public function getArchivedDealsRequest($filter_id = null, $ids = null, $owner_id = null, $person_id = null, $org_id = null, $pipeline_id = null, $stage_id = null, $status = null, $updated_since = null, $updated_until = null, $sort_by = 'id', $sort_direction = 'asc', $include_fields = null, $custom_fields = null, $limit = null, $cursor = null): Request
+ {
+
+ $resourcePath = '/deals/archived';
+ $formParams = [];
+ $queryParams = [];
+ $headerParams = [];
+ $httpBody = '';
+ $multipart = false;
+
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($filter_id)) {
+ $filter_id = ObjectSerializer::serializeCollection($filter_id, '', true);
+ }
+ if ($filter_id !== null) {
+ $queryParams['filter_id'] = $filter_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($ids)) {
+ $ids = ObjectSerializer::serializeCollection($ids, '', true);
+ }
+ if ($ids !== null) {
+ $queryParams['ids'] = $ids;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($owner_id)) {
+ $owner_id = ObjectSerializer::serializeCollection($owner_id, '', true);
+ }
+ if ($owner_id !== null) {
+ $queryParams['owner_id'] = $owner_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($person_id)) {
+ $person_id = ObjectSerializer::serializeCollection($person_id, '', true);
+ }
+ if ($person_id !== null) {
+ $queryParams['person_id'] = $person_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($org_id)) {
+ $org_id = ObjectSerializer::serializeCollection($org_id, '', true);
+ }
+ if ($org_id !== null) {
+ $queryParams['org_id'] = $org_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($pipeline_id)) {
+ $pipeline_id = ObjectSerializer::serializeCollection($pipeline_id, '', true);
+ }
+ if ($pipeline_id !== null) {
+ $queryParams['pipeline_id'] = $pipeline_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($stage_id)) {
+ $stage_id = ObjectSerializer::serializeCollection($stage_id, '', true);
+ }
+ if ($stage_id !== null) {
+ $queryParams['stage_id'] = $stage_id;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($status)) {
+ $status = ObjectSerializer::serializeCollection($status, '', true);
+ }
+ if ($status !== null) {
+ $queryParams['status'] = $status;
+ }
+ // 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($updated_until)) {
+ $updated_until = ObjectSerializer::serializeCollection($updated_until, '', true);
+ }
+ if ($updated_until !== null) {
+ $queryParams['updated_until'] = $updated_until;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($sort_by)) {
+ $sort_by = ObjectSerializer::serializeCollection($sort_by, '', true);
+ }
+ if ($sort_by !== null) {
+ $queryParams['sort_by'] = $sort_by;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($sort_direction)) {
+ $sort_direction = ObjectSerializer::serializeCollection($sort_direction, '', true);
+ }
+ if ($sort_direction !== null) {
+ $queryParams['sort_direction'] = $sort_direction;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($include_fields)) {
+ $include_fields = ObjectSerializer::serializeCollection($include_fields, '', true);
+ }
+ if ($include_fields !== null) {
+ $queryParams['include_fields'] = $include_fields;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($custom_fields)) {
+ $custom_fields = ObjectSerializer::serializeCollection($custom_fields, '', true);
+ }
+ if ($custom_fields !== null) {
+ $queryParams['custom_fields'] = $custom_fields;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($limit)) {
+ $limit = ObjectSerializer::serializeCollection($limit, '', true);
+ }
+ if ($limit !== null) {
+ $queryParams['limit'] = $limit;
+ }
+ // query params
+ /* @phpstan-ignore-next-line */
+ if (is_array($cursor)) {
+ $cursor = ObjectSerializer::serializeCollection($cursor, '', true);
+ }
+ if ($cursor !== null) {
+ $queryParams['cursor'] = $cursor;
+ }
+
+
+
+
/* @phpstan-ignore-next-line */
if ($multipart) {
$headers = $this->headerSelector->selectHeadersForMultipart(
diff --git a/lib/versions/v2/Model/DealItem.php b/lib/versions/v2/Model/DealItem.php
index 987f844..72c51f1 100644
--- a/lib/versions/v2/Model/DealItem.php
+++ b/lib/versions/v2/Model/DealItem.php
@@ -78,6 +78,7 @@ class DealItem implements ModelInterface, ArrayAccess, JsonSerializable
'add_time' => 'string',
'update_time' => 'string',
'stage_change_time' => 'string',
+ 'is_archived' => 'bool',
'is_deleted' => 'bool',
'status' => 'string',
'probability' => 'float',
@@ -117,6 +118,7 @@ class DealItem implements ModelInterface, ArrayAccess, JsonSerializable
'add_time' => null,
'update_time' => null,
'stage_change_time' => null,
+ 'is_archived' => null,
'is_deleted' => null,
'status' => null,
'probability' => null,
@@ -179,6 +181,7 @@ public static function openAPIFormats(): array
'add_time' => 'add_time',
'update_time' => 'update_time',
'stage_change_time' => 'stage_change_time',
+ 'is_archived' => 'is_archived',
'is_deleted' => 'is_deleted',
'status' => 'status',
'probability' => 'probability',
@@ -216,6 +219,7 @@ public static function openAPIFormats(): array
'add_time' => 'setAddTime',
'update_time' => 'setUpdateTime',
'stage_change_time' => 'setStageChangeTime',
+ 'is_archived' => 'setIsArchived',
'is_deleted' => 'setIsDeleted',
'status' => 'setStatus',
'probability' => 'setProbability',
@@ -253,6 +257,7 @@ public static function openAPIFormats(): array
'add_time' => 'getAddTime',
'update_time' => 'getUpdateTime',
'stage_change_time' => 'getStageChangeTime',
+ 'is_archived' => 'getIsArchived',
'is_deleted' => 'getIsDeleted',
'status' => 'getStatus',
'probability' => 'getProbability',
@@ -351,6 +356,7 @@ public function __construct(array $data = null)
$this->container['add_time'] = $data['add_time'] ?? null;
$this->container['update_time'] = $data['update_time'] ?? null;
$this->container['stage_change_time'] = $data['stage_change_time'] ?? null;
+ $this->container['is_archived'] = $data['is_archived'] ?? null;
$this->container['is_deleted'] = $data['is_deleted'] ?? null;
$this->container['status'] = $data['status'] ?? null;
$this->container['probability'] = $data['probability'] ?? null;
@@ -684,6 +690,30 @@ public function setStageChangeTime($stage_change_time): self
return $this;
}
+ /**
+ * Gets is_archived
+ *
+ * @return bool|null
+ */
+ public function getIsArchived()
+ {
+ return $this->container['is_archived'];
+ }
+
+ /**
+ * Sets is_archived
+ *
+ * @param bool|null $is_archived Whether the deal is archived or not
+ *
+ * @return self
+ */
+ public function setIsArchived($is_archived): self
+ {
+ $this->container['is_archived'] = $is_archived;
+
+ return $this;
+ }
+
/**
* Gets is_deleted
*
diff --git a/lib/versions/v2/Model/DealSearchItemItem.php b/lib/versions/v2/Model/DealSearchItemItem.php
index a6c7aac..5927a8a 100644
--- a/lib/versions/v2/Model/DealSearchItemItem.php
+++ b/lib/versions/v2/Model/DealSearchItemItem.php
@@ -78,7 +78,8 @@ class DealSearchItemItem implements ModelInterface, ArrayAccess, JsonSerializabl
'person' => '\Pipedrive\versions\v2\Model\DealSearchItemItemPerson',
'organization' => '\Pipedrive\versions\v2\Model\DealSearchItemItemOrganization',
'custom_fields' => 'string[]',
- 'notes' => 'string[]'
+ 'notes' => 'string[]',
+ 'is_archived' => 'bool'
];
/**
@@ -101,7 +102,8 @@ class DealSearchItemItem implements ModelInterface, ArrayAccess, JsonSerializabl
'person' => null,
'organization' => null,
'custom_fields' => null,
- 'notes' => null
+ 'notes' => null,
+ 'is_archived' => null
];
/**
@@ -147,7 +149,8 @@ public static function openAPIFormats(): array
'person' => 'person',
'organization' => 'organization',
'custom_fields' => 'custom_fields',
- 'notes' => 'notes'
+ 'notes' => 'notes',
+ 'is_archived' => 'is_archived'
];
/**
@@ -168,7 +171,8 @@ public static function openAPIFormats(): array
'person' => 'setPerson',
'organization' => 'setOrganization',
'custom_fields' => 'setCustomFields',
- 'notes' => 'setNotes'
+ 'notes' => 'setNotes',
+ 'is_archived' => 'setIsArchived'
];
/**
@@ -189,7 +193,8 @@ public static function openAPIFormats(): array
'person' => 'getPerson',
'organization' => 'getOrganization',
'custom_fields' => 'getCustomFields',
- 'notes' => 'getNotes'
+ 'notes' => 'getNotes',
+ 'is_archived' => 'getIsArchived'
];
/**
@@ -272,6 +277,7 @@ public function __construct(array $data = null)
$this->container['organization'] = $data['organization'] ?? null;
$this->container['custom_fields'] = $data['custom_fields'] ?? null;
$this->container['notes'] = $data['notes'] ?? null;
+ $this->container['is_archived'] = $data['is_archived'] ?? null;
}
/**
@@ -611,6 +617,30 @@ public function setNotes($notes): self
return $this;
}
+
+ /**
+ * Gets is_archived
+ *
+ * @return bool|null
+ */
+ public function getIsArchived()
+ {
+ return $this->container['is_archived'];
+ }
+
+ /**
+ * Sets is_archived
+ *
+ * @param bool|null $is_archived A flag indicating whether the deal is archived or not
+ *
+ * @return self
+ */
+ public function setIsArchived($is_archived): self
+ {
+ $this->container['is_archived'] = $is_archived;
+
+ return $this;
+ }
/**
* Returns true if offset exists. False otherwise.
*