From a3e3cf844bf55ac617f0f73642ed7104c3cba6c2 Mon Sep 17 00:00:00 2001 From: pipedrive-bot Date: Wed, 4 Mar 2026 11:02:56 +0000 Subject: [PATCH] Build 314 - version-minor --- CHANGELOG.md | 2 + docs/versions/v1/Model/LeadResponse.md | 1 + .../Model/ProjectMandatoryObjectFragment.md | 2 - .../v1/Model/ProjectObjectFragment.md | 2 + docs/versions/v1/Model/ProjectPostObject.md | 4 +- .../v1/Model/RequiredPostProjectParameters.md | 2 - docs/versions/v2/Model/DealItem.md | 1 + .../v1/Model/GetProductFieldResponse.php | 2 +- lib/versions/v1/Model/LeadResponse.php | 30 ++++++++ .../Model/ProjectMandatoryObjectFragment.php | 70 ++--------------- .../v1/Model/ProjectObjectFragment.php | 60 +++++++++++++++ lib/versions/v1/Model/ProjectPostObject.php | 14 +--- .../Model/RequiredPostProjectParameters.php | 76 ++----------------- lib/versions/v2/Model/DealItem.php | 30 ++++++++ 14 files changed, 143 insertions(+), 153 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3251b199..ea276701 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ 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] +### Changed +- Changed `board_id` and `phase_id` to be optional in `POST /api/v1/projects` ## [15.4.0](https://github.com/pipedrive/client-php/compare/15.3.0...15.4.0) (2026-02-16) diff --git a/docs/versions/v1/Model/LeadResponse.md b/docs/versions/v1/Model/LeadResponse.md index 6ffcdb42..10cec6ac 100644 --- a/docs/versions/v1/Model/LeadResponse.md +++ b/docs/versions/v1/Model/LeadResponse.md @@ -16,6 +16,7 @@ Name | Type | Description | Notes **origin_id** | **string** | The optional ID to further distinguish the origin of the lead - e.g. Which API integration created this Lead. | [optional] **channel** | **int** | The ID of your Marketing channel this Lead was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>. | [optional] **channel_id** | **string** | The optional ID to further distinguish the Marketing channel. | [optional] +**source_deal_id** | **int** | The ID of the deal if the lead was converted from a deal. | [optional] **is_archived** | **bool** | A flag indicating whether the lead is archived or not | [optional] **was_seen** | **bool** | A flag indicating whether the lead was seen by someone in the Pipedrive UI | [optional] **value** | [**\Pipedrive\versions\v1\Model\LeadValue**](LeadValue.md) | | [optional] diff --git a/docs/versions/v1/Model/ProjectMandatoryObjectFragment.md b/docs/versions/v1/Model/ProjectMandatoryObjectFragment.md index e06b5ec9..314aa8c5 100644 --- a/docs/versions/v1/Model/ProjectMandatoryObjectFragment.md +++ b/docs/versions/v1/Model/ProjectMandatoryObjectFragment.md @@ -5,7 +5,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **string** | The title of the project | [optional] -**board_id** | **float** | The ID of the board this project is associated with | [optional] -**phase_id** | **float** | The ID of the phase this project is associated with | [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/Model/ProjectObjectFragment.md b/docs/versions/v1/Model/ProjectObjectFragment.md index 26415f54..64fc271d 100644 --- a/docs/versions/v1/Model/ProjectObjectFragment.md +++ b/docs/versions/v1/Model/ProjectObjectFragment.md @@ -4,6 +4,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- +**board_id** | **float** | The ID of the board this project is associated with | [optional] +**phase_id** | **float** | The ID of the phase this project is associated with | [optional] **description** | **string** | The description of the project | [optional] **status** | **string** | The status of the project | [optional] **owner_id** | **float** | The ID of a project owner | [optional] diff --git a/docs/versions/v1/Model/ProjectPostObject.md b/docs/versions/v1/Model/ProjectPostObject.md index 89a31da9..264dd682 100644 --- a/docs/versions/v1/Model/ProjectPostObject.md +++ b/docs/versions/v1/Model/ProjectPostObject.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **string** | The title of the project | -**board_id** | **float** | The ID of a project board | -**phase_id** | **float** | The ID of a phase on a project board | +**board_id** | **float** | The ID of the board this project is associated with | [optional] +**phase_id** | **float** | The ID of the phase this project is associated with | [optional] **description** | **string** | The description of the project | [optional] **status** | **string** | The status of the project | [optional] **owner_id** | **float** | The ID of a project owner | [optional] diff --git a/docs/versions/v1/Model/RequiredPostProjectParameters.md b/docs/versions/v1/Model/RequiredPostProjectParameters.md index 8774b6d3..2955d16d 100644 --- a/docs/versions/v1/Model/RequiredPostProjectParameters.md +++ b/docs/versions/v1/Model/RequiredPostProjectParameters.md @@ -5,7 +5,5 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **string** | The title of the project | -**board_id** | **float** | The ID of a project board | -**phase_id** | **float** | The ID of a phase on a project board | [[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/Model/DealItem.md b/docs/versions/v2/Model/DealItem.md index 7af7ca02..ea025fc0 100644 --- a/docs/versions/v2/Model/DealItem.md +++ b/docs/versions/v2/Model/DealItem.md @@ -31,6 +31,7 @@ Name | Type | Description | Notes **origin_id** | **string** | The optional ID to further distinguish the origin of the deal - e.g. Which API integration created this Deal. | [optional] **channel** | **int** | The ID of your Marketing channel this Deal was created from. Recognized Marketing channels can be configured in your <a href=\"https://app.pipedrive.com/settings/fields\" target=\"_blank\" rel=\"noopener noreferrer\">Company settings</a>. | [optional] **channel_id** | **string** | The optional ID to further distinguish the Marketing channel. | [optional] +**source_lead_id** | **string** | The ID of the lead if the deal was converted from a lead. Only included when requested via include_fields parameter. | [optional] **arr** | **float** | Only available in Growth and above plans The Annual Recurring Revenue of the deal Null if there are no products attached to the deal | [optional] **mrr** | **float** | Only available in Growth and above plans The Monthly Recurring Revenue of the deal Null if there are no products attached to the deal | [optional] **acv** | **float** | Only available in Growth and above plans The Annual Contract Value of the deal Null if there are no products attached to the deal | [optional] diff --git a/lib/versions/v1/Model/GetProductFieldResponse.php b/lib/versions/v1/Model/GetProductFieldResponse.php index d4598170..e3e0c7f1 100644 --- a/lib/versions/v1/Model/GetProductFieldResponse.php +++ b/lib/versions/v1/Model/GetProductFieldResponse.php @@ -67,7 +67,7 @@ class GetProductFieldResponse implements ModelInterface, ArrayAccess, JsonSerial */ protected static array $openAPITypes = [ 'success' => 'bool', - 'data' => 'ProductField' + 'data' => '\Pipedrive\versions\v1\Model\ProductField' ]; /** diff --git a/lib/versions/v1/Model/LeadResponse.php b/lib/versions/v1/Model/LeadResponse.php index d94ede22..89ed7387 100644 --- a/lib/versions/v1/Model/LeadResponse.php +++ b/lib/versions/v1/Model/LeadResponse.php @@ -78,6 +78,7 @@ class LeadResponse implements ModelInterface, ArrayAccess, JsonSerializable 'origin_id' => 'string', 'channel' => 'int', 'channel_id' => 'string', + 'source_deal_id' => 'int', 'is_archived' => 'bool', 'was_seen' => 'bool', 'value' => '\Pipedrive\versions\v1\Model\LeadValue', @@ -109,6 +110,7 @@ class LeadResponse implements ModelInterface, ArrayAccess, JsonSerializable 'origin_id' => null, 'channel' => null, 'channel_id' => null, + 'source_deal_id' => null, 'is_archived' => null, 'was_seen' => null, 'value' => null, @@ -163,6 +165,7 @@ public static function openAPIFormats(): array 'origin_id' => 'origin_id', 'channel' => 'channel', 'channel_id' => 'channel_id', + 'source_deal_id' => 'source_deal_id', 'is_archived' => 'is_archived', 'was_seen' => 'was_seen', 'value' => 'value', @@ -192,6 +195,7 @@ public static function openAPIFormats(): array 'origin_id' => 'setOriginId', 'channel' => 'setChannel', 'channel_id' => 'setChannelId', + 'source_deal_id' => 'setSourceDealId', 'is_archived' => 'setIsArchived', 'was_seen' => 'setWasSeen', 'value' => 'setValue', @@ -221,6 +225,7 @@ public static function openAPIFormats(): array 'origin_id' => 'getOriginId', 'channel' => 'getChannel', 'channel_id' => 'getChannelId', + 'source_deal_id' => 'getSourceDealId', 'is_archived' => 'getIsArchived', 'was_seen' => 'getWasSeen', 'value' => 'getValue', @@ -311,6 +316,7 @@ public function __construct(array $data = null) $this->container['origin_id'] = $data['origin_id'] ?? null; $this->container['channel'] = $data['channel'] ?? null; $this->container['channel_id'] = $data['channel_id'] ?? null; + $this->container['source_deal_id'] = $data['source_deal_id'] ?? null; $this->container['is_archived'] = $data['is_archived'] ?? null; $this->container['was_seen'] = $data['was_seen'] ?? null; $this->container['value'] = $data['value'] ?? null; @@ -636,6 +642,30 @@ public function setChannelId($channel_id): self return $this; } + /** + * Gets source_deal_id + * + * @return int|null + */ + public function getSourceDealId() + { + return $this->container['source_deal_id']; + } + + /** + * Sets source_deal_id + * + * @param int|null $source_deal_id The ID of the deal if the lead was converted from a deal. + * + * @return self + */ + public function setSourceDealId($source_deal_id): self + { + $this->container['source_deal_id'] = $source_deal_id; + + return $this; + } + /** * Gets is_archived * diff --git a/lib/versions/v1/Model/ProjectMandatoryObjectFragment.php b/lib/versions/v1/Model/ProjectMandatoryObjectFragment.php index 484fbf2f..1c0c4b60 100644 --- a/lib/versions/v1/Model/ProjectMandatoryObjectFragment.php +++ b/lib/versions/v1/Model/ProjectMandatoryObjectFragment.php @@ -66,9 +66,7 @@ class ProjectMandatoryObjectFragment implements ModelInterface, ArrayAccess, Jso * @phpsalm-var array */ protected static array $openAPITypes = [ - 'title' => 'string', - 'board_id' => 'float', - 'phase_id' => 'float' + 'title' => 'string' ]; /** @@ -79,9 +77,7 @@ class ProjectMandatoryObjectFragment implements ModelInterface, ArrayAccess, Jso * @psalm-var array */ protected static $openAPIFormats = [ - 'title' => null, - 'board_id' => null, - 'phase_id' => null + 'title' => null ]; /** @@ -115,9 +111,7 @@ public static function openAPIFormats(): array * @var string[] */ protected static $attributeMap = [ - 'title' => 'title', - 'board_id' => 'board_id', - 'phase_id' => 'phase_id' + 'title' => 'title' ]; /** @@ -126,9 +120,7 @@ public static function openAPIFormats(): array * @var string[] */ protected static $setters = [ - 'title' => 'setTitle', - 'board_id' => 'setBoardId', - 'phase_id' => 'setPhaseId' + 'title' => 'setTitle' ]; /** @@ -137,9 +129,7 @@ public static function openAPIFormats(): array * @var string[] */ protected static $getters = [ - 'title' => 'getTitle', - 'board_id' => 'getBoardId', - 'phase_id' => 'getPhaseId' + 'title' => 'getTitle' ]; /** @@ -210,8 +200,6 @@ public function getModelName(): string public function __construct(array $data = null) { $this->container['title'] = $data['title'] ?? null; - $this->container['board_id'] = $data['board_id'] ?? null; - $this->container['phase_id'] = $data['phase_id'] ?? null; } /** @@ -263,54 +251,6 @@ public function setTitle($title): self return $this; } - - /** - * Gets board_id - * - * @return float|null - */ - public function getBoardId() - { - return $this->container['board_id']; - } - - /** - * Sets board_id - * - * @param float|null $board_id The ID of the board this project is associated with - * - * @return self - */ - public function setBoardId($board_id): self - { - $this->container['board_id'] = $board_id; - - return $this; - } - - /** - * Gets phase_id - * - * @return float|null - */ - public function getPhaseId() - { - return $this->container['phase_id']; - } - - /** - * Sets phase_id - * - * @param float|null $phase_id The ID of the phase this project is associated with - * - * @return self - */ - public function setPhaseId($phase_id): self - { - $this->container['phase_id'] = $phase_id; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/versions/v1/Model/ProjectObjectFragment.php b/lib/versions/v1/Model/ProjectObjectFragment.php index 1ddb0b1f..85af55ae 100644 --- a/lib/versions/v1/Model/ProjectObjectFragment.php +++ b/lib/versions/v1/Model/ProjectObjectFragment.php @@ -66,6 +66,8 @@ class ProjectObjectFragment implements ModelInterface, ArrayAccess, JsonSerializ * @phpsalm-var array */ protected static array $openAPITypes = [ + 'board_id' => 'float', + 'phase_id' => 'float', 'description' => 'string', 'status' => 'string', 'owner_id' => 'float', @@ -85,6 +87,8 @@ class ProjectObjectFragment implements ModelInterface, ArrayAccess, JsonSerializ * @psalm-var array */ protected static $openAPIFormats = [ + 'board_id' => null, + 'phase_id' => null, 'description' => null, 'status' => null, 'owner_id' => null, @@ -127,6 +131,8 @@ public static function openAPIFormats(): array * @var string[] */ protected static $attributeMap = [ + 'board_id' => 'board_id', + 'phase_id' => 'phase_id', 'description' => 'description', 'status' => 'status', 'owner_id' => 'owner_id', @@ -144,6 +150,8 @@ public static function openAPIFormats(): array * @var string[] */ protected static $setters = [ + 'board_id' => 'setBoardId', + 'phase_id' => 'setPhaseId', 'description' => 'setDescription', 'status' => 'setStatus', 'owner_id' => 'setOwnerId', @@ -161,6 +169,8 @@ public static function openAPIFormats(): array * @var string[] */ protected static $getters = [ + 'board_id' => 'getBoardId', + 'phase_id' => 'getPhaseId', 'description' => 'getDescription', 'status' => 'getStatus', 'owner_id' => 'getOwnerId', @@ -239,6 +249,8 @@ public function getModelName(): string */ public function __construct(array $data = null) { + $this->container['board_id'] = $data['board_id'] ?? null; + $this->container['phase_id'] = $data['phase_id'] ?? null; $this->container['description'] = $data['description'] ?? null; $this->container['status'] = $data['status'] ?? null; $this->container['owner_id'] = $data['owner_id'] ?? null; @@ -276,6 +288,54 @@ public function valid(): bool } + /** + * Gets board_id + * + * @return float|null + */ + public function getBoardId() + { + return $this->container['board_id']; + } + + /** + * Sets board_id + * + * @param float|null $board_id The ID of the board this project is associated with + * + * @return self + */ + public function setBoardId($board_id): self + { + $this->container['board_id'] = $board_id; + + return $this; + } + + /** + * Gets phase_id + * + * @return float|null + */ + public function getPhaseId() + { + return $this->container['phase_id']; + } + + /** + * Sets phase_id + * + * @param float|null $phase_id The ID of the phase this project is associated with + * + * @return self + */ + public function setPhaseId($phase_id): self + { + $this->container['phase_id'] = $phase_id; + + return $this; + } + /** * Gets description * diff --git a/lib/versions/v1/Model/ProjectPostObject.php b/lib/versions/v1/Model/ProjectPostObject.php index 52ac339a..44daf36e 100644 --- a/lib/versions/v1/Model/ProjectPostObject.php +++ b/lib/versions/v1/Model/ProjectPostObject.php @@ -288,12 +288,6 @@ public function listInvalidProperties(): array if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } - if ($this->container['board_id'] === null) { - $invalidProperties[] = "'board_id' can't be null"; - } - if ($this->container['phase_id'] === null) { - $invalidProperties[] = "'phase_id' can't be null"; - } return $invalidProperties; } @@ -336,7 +330,7 @@ public function setTitle($title): self /** * Gets board_id * - * @return float + * @return float|null */ public function getBoardId() { @@ -346,7 +340,7 @@ public function getBoardId() /** * Sets board_id * - * @param float $board_id The ID of a project board + * @param float|null $board_id The ID of the board this project is associated with * * @return self */ @@ -360,7 +354,7 @@ public function setBoardId($board_id): self /** * Gets phase_id * - * @return float + * @return float|null */ public function getPhaseId() { @@ -370,7 +364,7 @@ public function getPhaseId() /** * Sets phase_id * - * @param float $phase_id The ID of a phase on a project board + * @param float|null $phase_id The ID of the phase this project is associated with * * @return self */ diff --git a/lib/versions/v1/Model/RequiredPostProjectParameters.php b/lib/versions/v1/Model/RequiredPostProjectParameters.php index ab229d29..b0ff4b04 100644 --- a/lib/versions/v1/Model/RequiredPostProjectParameters.php +++ b/lib/versions/v1/Model/RequiredPostProjectParameters.php @@ -66,9 +66,7 @@ class RequiredPostProjectParameters implements ModelInterface, ArrayAccess, Json * @phpsalm-var array */ protected static array $openAPITypes = [ - 'title' => 'string', - 'board_id' => 'float', - 'phase_id' => 'float' + 'title' => 'string' ]; /** @@ -79,9 +77,7 @@ class RequiredPostProjectParameters implements ModelInterface, ArrayAccess, Json * @psalm-var array */ protected static $openAPIFormats = [ - 'title' => null, - 'board_id' => null, - 'phase_id' => null + 'title' => null ]; /** @@ -115,9 +111,7 @@ public static function openAPIFormats(): array * @var string[] */ protected static $attributeMap = [ - 'title' => 'title', - 'board_id' => 'board_id', - 'phase_id' => 'phase_id' + 'title' => 'title' ]; /** @@ -126,9 +120,7 @@ public static function openAPIFormats(): array * @var string[] */ protected static $setters = [ - 'title' => 'setTitle', - 'board_id' => 'setBoardId', - 'phase_id' => 'setPhaseId' + 'title' => 'setTitle' ]; /** @@ -137,9 +129,7 @@ public static function openAPIFormats(): array * @var string[] */ protected static $getters = [ - 'title' => 'getTitle', - 'board_id' => 'getBoardId', - 'phase_id' => 'getPhaseId' + 'title' => 'getTitle' ]; /** @@ -210,8 +200,6 @@ public function getModelName(): string public function __construct(array $data = null) { $this->container['title'] = $data['title'] ?? null; - $this->container['board_id'] = $data['board_id'] ?? null; - $this->container['phase_id'] = $data['phase_id'] ?? null; } /** @@ -228,12 +216,6 @@ public function listInvalidProperties(): array if ($this->container['title'] === null) { $invalidProperties[] = "'title' can't be null"; } - if ($this->container['board_id'] === null) { - $invalidProperties[] = "'board_id' can't be null"; - } - if ($this->container['phase_id'] === null) { - $invalidProperties[] = "'phase_id' can't be null"; - } return $invalidProperties; } @@ -272,54 +254,6 @@ public function setTitle($title): self return $this; } - - /** - * Gets board_id - * - * @return float - */ - public function getBoardId() - { - return $this->container['board_id']; - } - - /** - * Sets board_id - * - * @param float $board_id The ID of a project board - * - * @return self - */ - public function setBoardId($board_id): self - { - $this->container['board_id'] = $board_id; - - return $this; - } - - /** - * Gets phase_id - * - * @return float - */ - public function getPhaseId() - { - return $this->container['phase_id']; - } - - /** - * Sets phase_id - * - * @param float $phase_id The ID of a phase on a project board - * - * @return self - */ - public function setPhaseId($phase_id): self - { - $this->container['phase_id'] = $phase_id; - - return $this; - } /** * Returns true if offset exists. False otherwise. * diff --git a/lib/versions/v2/Model/DealItem.php b/lib/versions/v2/Model/DealItem.php index 8d7e1a43..75c87307 100644 --- a/lib/versions/v2/Model/DealItem.php +++ b/lib/versions/v2/Model/DealItem.php @@ -93,6 +93,7 @@ class DealItem implements ModelInterface, ArrayAccess, JsonSerializable 'origin_id' => 'string', 'channel' => 'int', 'channel_id' => 'string', + 'source_lead_id' => 'string', 'arr' => 'float', 'mrr' => 'float', 'acv' => 'float', @@ -134,6 +135,7 @@ class DealItem implements ModelInterface, ArrayAccess, JsonSerializable 'origin_id' => null, 'channel' => null, 'channel_id' => null, + 'source_lead_id' => 'uuid', 'arr' => null, 'mrr' => null, 'acv' => null, @@ -198,6 +200,7 @@ public static function openAPIFormats(): array 'origin_id' => 'origin_id', 'channel' => 'channel', 'channel_id' => 'channel_id', + 'source_lead_id' => 'source_lead_id', 'arr' => 'arr', 'mrr' => 'mrr', 'acv' => 'acv', @@ -237,6 +240,7 @@ public static function openAPIFormats(): array 'origin_id' => 'setOriginId', 'channel' => 'setChannel', 'channel_id' => 'setChannelId', + 'source_lead_id' => 'setSourceLeadId', 'arr' => 'setArr', 'mrr' => 'setMrr', 'acv' => 'setAcv', @@ -276,6 +280,7 @@ public static function openAPIFormats(): array 'origin_id' => 'getOriginId', 'channel' => 'getChannel', 'channel_id' => 'getChannelId', + 'source_lead_id' => 'getSourceLeadId', 'arr' => 'getArr', 'mrr' => 'getMrr', 'acv' => 'getAcv', @@ -376,6 +381,7 @@ public function __construct(array $data = null) $this->container['origin_id'] = $data['origin_id'] ?? null; $this->container['channel'] = $data['channel'] ?? null; $this->container['channel_id'] = $data['channel_id'] ?? null; + $this->container['source_lead_id'] = $data['source_lead_id'] ?? null; $this->container['arr'] = $data['arr'] ?? null; $this->container['mrr'] = $data['mrr'] ?? null; $this->container['acv'] = $data['acv'] ?? null; @@ -1056,6 +1062,30 @@ public function setChannelId($channel_id): self return $this; } + /** + * Gets source_lead_id + * + * @return string|null + */ + public function getSourceLeadId() + { + return $this->container['source_lead_id']; + } + + /** + * Sets source_lead_id + * + * @param string|null $source_lead_id The ID of the lead if the deal was converted from a lead. Only included when requested via include_fields parameter. + * + * @return self + */ + public function setSourceLeadId($source_lead_id): self + { + $this->container['source_lead_id'] = $source_lead_id; + + return $this; + } + /** * Gets arr *