Skip to content

Commit 77f72c5

Browse files
authored
Merge pull request #276 from pipedrive/310
Build 310 - version-minor
2 parents e7781dc + 23aa4ab commit 77f72c5

11 files changed

Lines changed: 148 additions & 14 deletions

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
## [15.3.0](https://github.com/pipedrive/client-php/compare/15.2.0...15.3.0) (2026-02-06)
10+
11+
### Added
12+
- Added `custom_fields` property to the Person entity request schema in v2 endpoints that will fix types in endpoints:
13+
- `POST /api/v2/persons`
14+
- `PATCH /api/v2/persons/{id}`
15+
- Added `custom_fields` property to the Product entity request schema in v2 endpoints that will fix types in endpoints:
16+
- `POST /api/v2/products`
17+
- `PATCH /api/v2/products/{id}`
18+
919
## [15.2.0](https://github.com/pipedrive/client-php/compare/15.1.1...15.2.0) (2026-02-06)
1020

1121
### Fixed

docs/versions/v2/Model/AddProductRequestBody.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
1414
**is_linkable** | **bool** | Whether this product can be added to a deal or not | [optional] [default to true]
1515
**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]
1616
**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]
17+
**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]
1718
**billing_frequency** | [**\Pipedrive\versions\v2\Model\BillingFrequency1**](BillingFrequency1.md) | | [optional]
1819
**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]
1920

docs/versions/v2/Model/PersonRequestBody.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,6 @@ Name | Type | Description | Notes
1414
**visible_to** | **int** | The visibility of the person | [optional]
1515
**label_ids** | **int[]** | The IDs of labels assigned to the person | [optional]
1616
**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]
17+
**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]
1718

1819
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/versions/v2/Model/ProductRequest.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,6 @@ Name | Type | Description | Notes
1313
**is_linkable** | **bool** | Whether this product can be added to a deal or not | [optional] [default to true]
1414
**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]
1515
**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]
16+
**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]
1617

1718
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/versions/v2/Model/UpdateProductRequestBody.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Name | Type | Description | Notes
1414
**is_linkable** | **bool** | Whether this product can be added to a deal or not | [optional] [default to true]
1515
**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]
1616
**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]
17+
**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]
1718
**billing_frequency** | [**\Pipedrive\versions\v2\Model\BillingFrequency1**](BillingFrequency1.md) | | [optional]
1819
**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]
1920

lib/versions/v1/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ class Configuration
111111
*/
112112
protected string $host = 'https://api.pipedrive.com/v1';
113113
/**
114-
* User agent of the HTTP request, set to "Pipedrive-SDK-PHP-14.x" by default
114+
* User agent of the HTTP request, set to "Pipedrive-SDK-PHP-15.x" by default
115115
*
116116
* @var string
117117
*/
118-
protected string $userAgent = 'Pipedrive-SDK-PHP-14.x';
118+
protected string $userAgent = 'Pipedrive-SDK-PHP-15.x';
119119

120120
/**
121121
* Debug switch (default set to false)

lib/versions/v2/Configuration.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,11 +111,11 @@ class Configuration
111111
*/
112112
protected string $host = 'https://api.pipedrive.com/api/v2';
113113
/**
114-
* User agent of the HTTP request, set to "Pipedrive-SDK-PHP-14.x" by default
114+
* User agent of the HTTP request, set to "Pipedrive-SDK-PHP-15.x" by default
115115
*
116116
* @var string
117117
*/
118-
protected string $userAgent = 'Pipedrive-SDK-PHP-14.x';
118+
protected string $userAgent = 'Pipedrive-SDK-PHP-15.x';
119119

120120
/**
121121
* Debug switch (default set to false)

lib/versions/v2/Model/AddProductRequestBody.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ class AddProductRequestBody implements ModelInterface, ArrayAccess, JsonSerializ
7676
'is_linkable' => 'bool',
7777
'visible_to' => '\Pipedrive\versions\v2\Model\VisibleTo',
7878
'prices' => 'object[]',
79+
'custom_fields' => 'array<string,object>',
7980
'billing_frequency' => '\Pipedrive\versions\v2\Model\BillingFrequency1',
8081
'billing_frequency_cycles' => 'int'
8182
];
@@ -98,6 +99,7 @@ class AddProductRequestBody implements ModelInterface, ArrayAccess, JsonSerializ
9899
'is_linkable' => null,
99100
'visible_to' => null,
100101
'prices' => null,
102+
'custom_fields' => null,
101103
'billing_frequency' => null,
102104
'billing_frequency_cycles' => null
103105
];
@@ -143,6 +145,7 @@ public static function openAPIFormats(): array
143145
'is_linkable' => 'is_linkable',
144146
'visible_to' => 'visible_to',
145147
'prices' => 'prices',
148+
'custom_fields' => 'custom_fields',
146149
'billing_frequency' => 'billing_frequency',
147150
'billing_frequency_cycles' => 'billing_frequency_cycles'
148151
];
@@ -163,6 +166,7 @@ public static function openAPIFormats(): array
163166
'is_linkable' => 'setIsLinkable',
164167
'visible_to' => 'setVisibleTo',
165168
'prices' => 'setPrices',
169+
'custom_fields' => 'setCustomFields',
166170
'billing_frequency' => 'setBillingFrequency',
167171
'billing_frequency_cycles' => 'setBillingFrequencyCycles'
168172
];
@@ -183,6 +187,7 @@ public static function openAPIFormats(): array
183187
'is_linkable' => 'getIsLinkable',
184188
'visible_to' => 'getVisibleTo',
185189
'prices' => 'getPrices',
190+
'custom_fields' => 'getCustomFields',
186191
'billing_frequency' => 'getBillingFrequency',
187192
'billing_frequency_cycles' => 'getBillingFrequencyCycles'
188193
];
@@ -264,6 +269,7 @@ public function __construct(array $data = null)
264269
$this->container['is_linkable'] = $data['is_linkable'] ?? true;
265270
$this->container['visible_to'] = $data['visible_to'] ?? null;
266271
$this->container['prices'] = $data['prices'] ?? null;
272+
$this->container['custom_fields'] = $data['custom_fields'] ?? null;
267273
$this->container['billing_frequency'] = $data['billing_frequency'] ?? null;
268274
$this->container['billing_frequency_cycles'] = $data['billing_frequency_cycles'] ?? null;
269275
}
@@ -534,6 +540,30 @@ public function setPrices($prices): self
534540
return $this;
535541
}
536542

543+
/**
544+
* Gets custom_fields
545+
*
546+
* @return array<string,object>|null
547+
*/
548+
public function getCustomFields()
549+
{
550+
return $this->container['custom_fields'];
551+
}
552+
553+
/**
554+
* Sets custom_fields
555+
*
556+
* @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
557+
*
558+
* @return self
559+
*/
560+
public function setCustomFields($custom_fields): self
561+
{
562+
$this->container['custom_fields'] = $custom_fields;
563+
564+
return $this;
565+
}
566+
537567
/**
538568
* Gets billing_frequency
539569
*

lib/versions/v2/Model/PersonRequestBody.php

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ class PersonRequestBody implements ModelInterface, ArrayAccess, JsonSerializable
7575
'phones' => '\Pipedrive\versions\v2\Model\PersonItemPhones[]',
7676
'visible_to' => 'int',
7777
'label_ids' => 'int[]',
78-
'marketing_status' => 'string'
78+
'marketing_status' => 'string',
79+
'custom_fields' => 'array<string,object>'
7980
];
8081

8182
/**
@@ -95,7 +96,8 @@ class PersonRequestBody implements ModelInterface, ArrayAccess, JsonSerializable
9596
'phones' => null,
9697
'visible_to' => null,
9798
'label_ids' => null,
98-
'marketing_status' => null
99+
'marketing_status' => null,
100+
'custom_fields' => null
99101
];
100102

101103
/**
@@ -138,7 +140,8 @@ public static function openAPIFormats(): array
138140
'phones' => 'phones',
139141
'visible_to' => 'visible_to',
140142
'label_ids' => 'label_ids',
141-
'marketing_status' => 'marketing_status'
143+
'marketing_status' => 'marketing_status',
144+
'custom_fields' => 'custom_fields'
142145
];
143146

144147
/**
@@ -156,7 +159,8 @@ public static function openAPIFormats(): array
156159
'phones' => 'setPhones',
157160
'visible_to' => 'setVisibleTo',
158161
'label_ids' => 'setLabelIds',
159-
'marketing_status' => 'setMarketingStatus'
162+
'marketing_status' => 'setMarketingStatus',
163+
'custom_fields' => 'setCustomFields'
160164
];
161165

162166
/**
@@ -174,7 +178,8 @@ public static function openAPIFormats(): array
174178
'phones' => 'getPhones',
175179
'visible_to' => 'getVisibleTo',
176180
'label_ids' => 'getLabelIds',
177-
'marketing_status' => 'getMarketingStatus'
181+
'marketing_status' => 'getMarketingStatus',
182+
'custom_fields' => 'getCustomFields'
178183
];
179184

180185
/**
@@ -275,6 +280,7 @@ public function __construct(array $data = null)
275280
$this->container['visible_to'] = $data['visible_to'] ?? null;
276281
$this->container['label_ids'] = $data['label_ids'] ?? null;
277282
$this->container['marketing_status'] = $data['marketing_status'] ?? null;
283+
$this->container['custom_fields'] = $data['custom_fields'] ?? null;
278284
}
279285

280286
/**
@@ -561,6 +567,30 @@ public function setMarketingStatus($marketing_status): self
561567

562568
return $this;
563569
}
570+
571+
/**
572+
* Gets custom_fields
573+
*
574+
* @return array<string,object>|null
575+
*/
576+
public function getCustomFields()
577+
{
578+
return $this->container['custom_fields'];
579+
}
580+
581+
/**
582+
* Sets custom_fields
583+
*
584+
* @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
585+
*
586+
* @return self
587+
*/
588+
public function setCustomFields($custom_fields): self
589+
{
590+
$this->container['custom_fields'] = $custom_fields;
591+
592+
return $this;
593+
}
564594
/**
565595
* Returns true if offset exists. False otherwise.
566596
*

lib/versions/v2/Model/ProductRequest.php

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ class ProductRequest implements ModelInterface, ArrayAccess, JsonSerializable
7474
'owner_id' => 'int',
7575
'is_linkable' => 'bool',
7676
'visible_to' => '\Pipedrive\versions\v2\Model\VisibleTo',
77-
'prices' => 'object[]'
77+
'prices' => 'object[]',
78+
'custom_fields' => 'array<string,object>'
7879
];
7980

8081
/**
@@ -93,7 +94,8 @@ class ProductRequest implements ModelInterface, ArrayAccess, JsonSerializable
9394
'owner_id' => null,
9495
'is_linkable' => null,
9596
'visible_to' => null,
96-
'prices' => null
97+
'prices' => null,
98+
'custom_fields' => null
9799
];
98100

99101
/**
@@ -135,7 +137,8 @@ public static function openAPIFormats(): array
135137
'owner_id' => 'owner_id',
136138
'is_linkable' => 'is_linkable',
137139
'visible_to' => 'visible_to',
138-
'prices' => 'prices'
140+
'prices' => 'prices',
141+
'custom_fields' => 'custom_fields'
139142
];
140143

141144
/**
@@ -152,7 +155,8 @@ public static function openAPIFormats(): array
152155
'owner_id' => 'setOwnerId',
153156
'is_linkable' => 'setIsLinkable',
154157
'visible_to' => 'setVisibleTo',
155-
'prices' => 'setPrices'
158+
'prices' => 'setPrices',
159+
'custom_fields' => 'setCustomFields'
156160
];
157161

158162
/**
@@ -169,7 +173,8 @@ public static function openAPIFormats(): array
169173
'owner_id' => 'getOwnerId',
170174
'is_linkable' => 'getIsLinkable',
171175
'visible_to' => 'getVisibleTo',
172-
'prices' => 'getPrices'
176+
'prices' => 'getPrices',
177+
'custom_fields' => 'getCustomFields'
173178
];
174179

175180
/**
@@ -248,6 +253,7 @@ public function __construct(array $data = null)
248253
$this->container['is_linkable'] = $data['is_linkable'] ?? true;
249254
$this->container['visible_to'] = $data['visible_to'] ?? null;
250255
$this->container['prices'] = $data['prices'] ?? null;
256+
$this->container['custom_fields'] = $data['custom_fields'] ?? null;
251257
}
252258

253259
/**
@@ -491,6 +497,30 @@ public function setPrices($prices): self
491497

492498
return $this;
493499
}
500+
501+
/**
502+
* Gets custom_fields
503+
*
504+
* @return array<string,object>|null
505+
*/
506+
public function getCustomFields()
507+
{
508+
return $this->container['custom_fields'];
509+
}
510+
511+
/**
512+
* Sets custom_fields
513+
*
514+
* @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
515+
*
516+
* @return self
517+
*/
518+
public function setCustomFields($custom_fields): self
519+
{
520+
$this->container['custom_fields'] = $custom_fields;
521+
522+
return $this;
523+
}
494524
/**
495525
* Returns true if offset exists. False otherwise.
496526
*

0 commit comments

Comments
 (0)