Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [15.3.0](https://github.com/pipedrive/client-php/compare/15.2.0...15.3.0) (2026-02-06)

### Added
- Added `custom_fields` property to the Person entity request schema in v2 endpoints that will fix types in endpoints:
- `POST /api/v2/persons`
- `PATCH /api/v2/persons/{id}`
- Added `custom_fields` property to the Product entity request schema in v2 endpoints that will fix types in endpoints:
- `POST /api/v2/products`
- `PATCH /api/v2/products/{id}`

## [15.2.0](https://github.com/pipedrive/client-php/compare/15.1.1...15.2.0) (2026-02-06)

### Fixed
Expand Down
1 change: 1 addition & 0 deletions docs/versions/v2/Model/AddProductRequestBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Name | Type | Description | Notes
**is_linkable** | **bool** | Whether this product can be added to a deal or not | [optional] [default to true]
**visible_to** | [**VisibleTo**](VisibleTo.md) | The visibility of the product. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups <a href=\"https://support.pipedrive.com/en/article/visibility-groups\" target=\"_blank\" rel=\"noopener noreferrer\">here</a>.<h4>Light / Growth and Professional plans</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner & followers</td><tr><td>`3`</td><td>Entire company</td></tr></table><h4>Premium / Ultimate plan</h4><table><tr><th style=\"width: 40px\">Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner only</td><tr><td>`3`</td><td>Owner's visibility group</td></tr><tr><td>`5`</td><td>Owner's visibility group and sub-groups</td></tr><tr><td>`7`</td><td>Entire company</td></tr></table> | [optional]
**prices** | **object[]** | An array of objects, each containing: `currency` (string), `price` (number), `cost` (number, optional), `direct_cost` (number, optional). Note that there can only be one price per product per currency. When `prices` is omitted altogether, a default price of 0 and the user's default currency will be assigned. | [optional]
**custom_fields** | **array<string,object>** | An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes | [optional]
**billing_frequency** | [**\Pipedrive\versions\v2\Model\BillingFrequency1**](BillingFrequency1.md) | | [optional]
**billing_frequency_cycles** | **int** | Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When &#x60;billing_frequency&#x60; is set to &#x60;one-time&#x60;, this field must be &#x60;null&#x60; When &#x60;billing_frequency&#x60; is set to &#x60;weekly&#x60;, this field cannot be &#x60;null&#x60; For all the other values of &#x60;billing_frequency&#x60;, &#x60;null&#x60; represents a product billed indefinitely Must be a positive integer less or equal to 208 | [optional]

Expand Down
1 change: 1 addition & 0 deletions docs/versions/v2/Model/PersonRequestBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,6 @@ Name | Type | Description | Notes
**visible_to** | **int** | The visibility of the person | [optional]
**label_ids** | **int[]** | The IDs of labels assigned to the person | [optional]
**marketing_status** | **string** | If the person does not have a valid email address, then the marketing status is **not set** and &#x60;no_consent&#x60; is returned for the &#x60;marketing_status&#x60; value when the new person is created. If the change is forbidden, the status will remain unchanged for every call that tries to modify the marketing status. Please be aware that it is only allowed **once** to change the marketing status from an old status to a new one.&lt;table&gt;&lt;tr&gt;&lt;th&gt;Value&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;no_consent&#x60;&lt;/td&gt;&lt;td&gt;The customer has not given consent to receive any marketing communications&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;unsubscribed&#x60;&lt;/td&gt;&lt;td&gt;The customers have unsubscribed from ALL marketing communications&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;subscribed&#x60;&lt;/td&gt;&lt;td&gt;The customers are subscribed and are counted towards marketing caps&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;archived&#x60;&lt;/td&gt;&lt;td&gt;The customers with &#x60;subscribed&#x60; status can be moved to &#x60;archived&#x60; to save consent, but they are not paid for&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; | [optional]
**custom_fields** | **array<string,object>** | An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes | [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)
1 change: 1 addition & 0 deletions docs/versions/v2/Model/ProductRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ Name | Type | Description | Notes
**is_linkable** | **bool** | Whether this product can be added to a deal or not | [optional] [default to true]
**visible_to** | [**VisibleTo**](VisibleTo.md) | The visibility of the product. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups &lt;a href&#x3D;\&quot;https://support.pipedrive.com/en/article/visibility-groups\&quot; target&#x3D;\&quot;_blank\&quot; rel&#x3D;\&quot;noopener noreferrer\&quot;&gt;here&lt;/a&gt;.&lt;h4&gt;Light / Growth and Professional plans&lt;/h4&gt;&lt;table&gt;&lt;tr&gt;&lt;th style&#x3D;\&quot;width: 40px\&quot;&gt;Value&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;1&#x60;&lt;/td&gt;&lt;td&gt;Owner &amp;amp; followers&lt;/td&gt;&lt;tr&gt;&lt;td&gt;&#x60;3&#x60;&lt;/td&gt;&lt;td&gt;Entire company&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;h4&gt;Premium / Ultimate plan&lt;/h4&gt;&lt;table&gt;&lt;tr&gt;&lt;th style&#x3D;\&quot;width: 40px\&quot;&gt;Value&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;1&#x60;&lt;/td&gt;&lt;td&gt;Owner only&lt;/td&gt;&lt;tr&gt;&lt;td&gt;&#x60;3&#x60;&lt;/td&gt;&lt;td&gt;Owner&#39;s visibility group&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;5&#x60;&lt;/td&gt;&lt;td&gt;Owner&#39;s visibility group and sub-groups&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;7&#x60;&lt;/td&gt;&lt;td&gt;Entire company&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; | [optional]
**prices** | **object[]** | An array of objects, each containing: &#x60;currency&#x60; (string), &#x60;price&#x60; (number), &#x60;cost&#x60; (number, optional), &#x60;direct_cost&#x60; (number, optional). Note that there can only be one price per product per currency. When &#x60;prices&#x60; is omitted altogether, a default price of 0 and the user&#39;s default currency will be assigned. | [optional]
**custom_fields** | **array<string,object>** | An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes | [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)
1 change: 1 addition & 0 deletions docs/versions/v2/Model/UpdateProductRequestBody.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Name | Type | Description | Notes
**is_linkable** | **bool** | Whether this product can be added to a deal or not | [optional] [default to true]
**visible_to** | [**VisibleTo**](VisibleTo.md) | The visibility of the product. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user. Read more about visibility groups &lt;a href&#x3D;\&quot;https://support.pipedrive.com/en/article/visibility-groups\&quot; target&#x3D;\&quot;_blank\&quot; rel&#x3D;\&quot;noopener noreferrer\&quot;&gt;here&lt;/a&gt;.&lt;h4&gt;Light / Growth and Professional plans&lt;/h4&gt;&lt;table&gt;&lt;tr&gt;&lt;th style&#x3D;\&quot;width: 40px\&quot;&gt;Value&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;1&#x60;&lt;/td&gt;&lt;td&gt;Owner &amp;amp; followers&lt;/td&gt;&lt;tr&gt;&lt;td&gt;&#x60;3&#x60;&lt;/td&gt;&lt;td&gt;Entire company&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;h4&gt;Premium / Ultimate plan&lt;/h4&gt;&lt;table&gt;&lt;tr&gt;&lt;th style&#x3D;\&quot;width: 40px\&quot;&gt;Value&lt;/th&gt;&lt;th&gt;Description&lt;/th&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;1&#x60;&lt;/td&gt;&lt;td&gt;Owner only&lt;/td&gt;&lt;tr&gt;&lt;td&gt;&#x60;3&#x60;&lt;/td&gt;&lt;td&gt;Owner&#39;s visibility group&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;5&#x60;&lt;/td&gt;&lt;td&gt;Owner&#39;s visibility group and sub-groups&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&#x60;7&#x60;&lt;/td&gt;&lt;td&gt;Entire company&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; | [optional]
**prices** | **object[]** | An array of objects, each containing: &#x60;currency&#x60; (string), &#x60;price&#x60; (number), &#x60;cost&#x60; (number, optional), &#x60;direct_cost&#x60; (number, optional). Note that there can only be one price per product per currency. When &#x60;prices&#x60; is omitted altogether, a default price of 0 and the user&#39;s default currency will be assigned. | [optional]
**custom_fields** | **array<string,object>** | An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes | [optional]
**billing_frequency** | [**\Pipedrive\versions\v2\Model\BillingFrequency1**](BillingFrequency1.md) | | [optional]
**billing_frequency_cycles** | **int** | Only available in Growth and above plans The number of times the billing frequency repeats for a product in a deal When &#x60;billing_frequency&#x60; is set to &#x60;one-time&#x60;, this field must be &#x60;null&#x60; When &#x60;billing_frequency&#x60; is set to &#x60;weekly&#x60;, this field cannot be &#x60;null&#x60; For all the other values of &#x60;billing_frequency&#x60;, &#x60;null&#x60; represents a product billed indefinitely Must be a positive integer less or equal to 208 | [optional]

Expand Down
4 changes: 2 additions & 2 deletions lib/versions/v1/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ class Configuration
*/
protected string $host = 'https://api.pipedrive.com/v1';
/**
* User agent of the HTTP request, set to "Pipedrive-SDK-PHP-14.x" by default
* User agent of the HTTP request, set to "Pipedrive-SDK-PHP-15.x" by default
*
* @var string
*/
protected string $userAgent = 'Pipedrive-SDK-PHP-14.x';
protected string $userAgent = 'Pipedrive-SDK-PHP-15.x';

/**
* Debug switch (default set to false)
Expand Down
4 changes: 2 additions & 2 deletions lib/versions/v2/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ class Configuration
*/
protected string $host = 'https://api.pipedrive.com/api/v2';
/**
* User agent of the HTTP request, set to "Pipedrive-SDK-PHP-14.x" by default
* User agent of the HTTP request, set to "Pipedrive-SDK-PHP-15.x" by default
*
* @var string
*/
protected string $userAgent = 'Pipedrive-SDK-PHP-14.x';
protected string $userAgent = 'Pipedrive-SDK-PHP-15.x';

/**
* Debug switch (default set to false)
Expand Down
30 changes: 30 additions & 0 deletions lib/versions/v2/Model/AddProductRequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class AddProductRequestBody implements ModelInterface, ArrayAccess, JsonSerializ
'is_linkable' => 'bool',
'visible_to' => '\Pipedrive\versions\v2\Model\VisibleTo',
'prices' => 'object[]',
'custom_fields' => 'array<string,object>',
'billing_frequency' => '\Pipedrive\versions\v2\Model\BillingFrequency1',
'billing_frequency_cycles' => 'int'
];
Expand All @@ -98,6 +99,7 @@ class AddProductRequestBody implements ModelInterface, ArrayAccess, JsonSerializ
'is_linkable' => null,
'visible_to' => null,
'prices' => null,
'custom_fields' => null,
'billing_frequency' => null,
'billing_frequency_cycles' => null
];
Expand Down Expand Up @@ -143,6 +145,7 @@ public static function openAPIFormats(): array
'is_linkable' => 'is_linkable',
'visible_to' => 'visible_to',
'prices' => 'prices',
'custom_fields' => 'custom_fields',
'billing_frequency' => 'billing_frequency',
'billing_frequency_cycles' => 'billing_frequency_cycles'
];
Expand All @@ -163,6 +166,7 @@ public static function openAPIFormats(): array
'is_linkable' => 'setIsLinkable',
'visible_to' => 'setVisibleTo',
'prices' => 'setPrices',
'custom_fields' => 'setCustomFields',
'billing_frequency' => 'setBillingFrequency',
'billing_frequency_cycles' => 'setBillingFrequencyCycles'
];
Expand All @@ -183,6 +187,7 @@ public static function openAPIFormats(): array
'is_linkable' => 'getIsLinkable',
'visible_to' => 'getVisibleTo',
'prices' => 'getPrices',
'custom_fields' => 'getCustomFields',
'billing_frequency' => 'getBillingFrequency',
'billing_frequency_cycles' => 'getBillingFrequencyCycles'
];
Expand Down Expand Up @@ -264,6 +269,7 @@ public function __construct(array $data = null)
$this->container['is_linkable'] = $data['is_linkable'] ?? true;
$this->container['visible_to'] = $data['visible_to'] ?? null;
$this->container['prices'] = $data['prices'] ?? null;
$this->container['custom_fields'] = $data['custom_fields'] ?? null;
$this->container['billing_frequency'] = $data['billing_frequency'] ?? null;
$this->container['billing_frequency_cycles'] = $data['billing_frequency_cycles'] ?? null;
}
Expand Down Expand Up @@ -534,6 +540,30 @@ public function setPrices($prices): self
return $this;
}

/**
* Gets custom_fields
*
* @return array<string,object>|null
*/
public function getCustomFields()
{
return $this->container['custom_fields'];
}

/**
* Sets custom_fields
*
* @param array<string,object>|null $custom_fields An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes
*
* @return self
*/
public function setCustomFields($custom_fields): self
{
$this->container['custom_fields'] = $custom_fields;

return $this;
}

/**
* Gets billing_frequency
*
Expand Down
40 changes: 35 additions & 5 deletions lib/versions/v2/Model/PersonRequestBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ class PersonRequestBody implements ModelInterface, ArrayAccess, JsonSerializable
'phones' => '\Pipedrive\versions\v2\Model\PersonItemPhones[]',
'visible_to' => 'int',
'label_ids' => 'int[]',
'marketing_status' => 'string'
'marketing_status' => 'string',
'custom_fields' => 'array<string,object>'
];

/**
Expand All @@ -95,7 +96,8 @@ class PersonRequestBody implements ModelInterface, ArrayAccess, JsonSerializable
'phones' => null,
'visible_to' => null,
'label_ids' => null,
'marketing_status' => null
'marketing_status' => null,
'custom_fields' => null
];

/**
Expand Down Expand Up @@ -138,7 +140,8 @@ public static function openAPIFormats(): array
'phones' => 'phones',
'visible_to' => 'visible_to',
'label_ids' => 'label_ids',
'marketing_status' => 'marketing_status'
'marketing_status' => 'marketing_status',
'custom_fields' => 'custom_fields'
];

/**
Expand All @@ -156,7 +159,8 @@ public static function openAPIFormats(): array
'phones' => 'setPhones',
'visible_to' => 'setVisibleTo',
'label_ids' => 'setLabelIds',
'marketing_status' => 'setMarketingStatus'
'marketing_status' => 'setMarketingStatus',
'custom_fields' => 'setCustomFields'
];

/**
Expand All @@ -174,7 +178,8 @@ public static function openAPIFormats(): array
'phones' => 'getPhones',
'visible_to' => 'getVisibleTo',
'label_ids' => 'getLabelIds',
'marketing_status' => 'getMarketingStatus'
'marketing_status' => 'getMarketingStatus',
'custom_fields' => 'getCustomFields'
];

/**
Expand Down Expand Up @@ -275,6 +280,7 @@ public function __construct(array $data = null)
$this->container['visible_to'] = $data['visible_to'] ?? null;
$this->container['label_ids'] = $data['label_ids'] ?? null;
$this->container['marketing_status'] = $data['marketing_status'] ?? null;
$this->container['custom_fields'] = $data['custom_fields'] ?? null;
}

/**
Expand Down Expand Up @@ -561,6 +567,30 @@ public function setMarketingStatus($marketing_status): self

return $this;
}

/**
* Gets custom_fields
*
* @return array<string,object>|null
*/
public function getCustomFields()
{
return $this->container['custom_fields'];
}

/**
* Sets custom_fields
*
* @param array<string,object>|null $custom_fields An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes
*
* @return self
*/
public function setCustomFields($custom_fields): self
{
$this->container['custom_fields'] = $custom_fields;

return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
Expand Down
40 changes: 35 additions & 5 deletions lib/versions/v2/Model/ProductRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ class ProductRequest implements ModelInterface, ArrayAccess, JsonSerializable
'owner_id' => 'int',
'is_linkable' => 'bool',
'visible_to' => '\Pipedrive\versions\v2\Model\VisibleTo',
'prices' => 'object[]'
'prices' => 'object[]',
'custom_fields' => 'array<string,object>'
];

/**
Expand All @@ -93,7 +94,8 @@ class ProductRequest implements ModelInterface, ArrayAccess, JsonSerializable
'owner_id' => null,
'is_linkable' => null,
'visible_to' => null,
'prices' => null
'prices' => null,
'custom_fields' => null
];

/**
Expand Down Expand Up @@ -135,7 +137,8 @@ public static function openAPIFormats(): array
'owner_id' => 'owner_id',
'is_linkable' => 'is_linkable',
'visible_to' => 'visible_to',
'prices' => 'prices'
'prices' => 'prices',
'custom_fields' => 'custom_fields'
];

/**
Expand All @@ -152,7 +155,8 @@ public static function openAPIFormats(): array
'owner_id' => 'setOwnerId',
'is_linkable' => 'setIsLinkable',
'visible_to' => 'setVisibleTo',
'prices' => 'setPrices'
'prices' => 'setPrices',
'custom_fields' => 'setCustomFields'
];

/**
Expand All @@ -169,7 +173,8 @@ public static function openAPIFormats(): array
'owner_id' => 'getOwnerId',
'is_linkable' => 'getIsLinkable',
'visible_to' => 'getVisibleTo',
'prices' => 'getPrices'
'prices' => 'getPrices',
'custom_fields' => 'getCustomFields'
];

/**
Expand Down Expand Up @@ -248,6 +253,7 @@ public function __construct(array $data = null)
$this->container['is_linkable'] = $data['is_linkable'] ?? true;
$this->container['visible_to'] = $data['visible_to'] ?? null;
$this->container['prices'] = $data['prices'] ?? null;
$this->container['custom_fields'] = $data['custom_fields'] ?? null;
}

/**
Expand Down Expand Up @@ -491,6 +497,30 @@ public function setPrices($prices): self

return $this;
}

/**
* Gets custom_fields
*
* @return array<string,object>|null
*/
public function getCustomFields()
{
return $this->container['custom_fields'];
}

/**
* Sets custom_fields
*
* @param array<string,object>|null $custom_fields An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes
*
* @return self
*/
public function setCustomFields($custom_fields): self
{
$this->container['custom_fields'] = $custom_fields;

return $this;
}
/**
* Returns true if offset exists. False otherwise.
*
Expand Down
Loading