Skip to content

Commit 4f35a05

Browse files
author
pipedrive-bot
committed
Build 1232 - version-patch
1 parent 2dd9516 commit 4f35a05

14 files changed

+370
-43
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ The file format of it is based on [Keep a Changelog](http://keepachangelog.com/e
77
For public Changelog covering all changes done to Pipedrive’s API, webhooks and app extensions platforms, see [public Changelog](https://pipedrive.readme.io/docs/changelog) with discussion area in [Developers Community](https://devcommunity.pipedrive.com/c/documentation/changelog/19).
88

99
## [Unreleased]
10+
### Fixed
11+
- Updated `PUT /persons/{id}`: parameter `name` is not required
1012

1113
## 14.0.0
1214
### Changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1182,6 +1182,8 @@ Class | Method | HTTP request | Description
11821182
- [Pipedrive.UpdateFilterRequest](docs/UpdateFilterRequest.md)
11831183
- [Pipedrive.UpdateLeadLabelRequest](docs/UpdateLeadLabelRequest.md)
11841184
- [Pipedrive.UpdateLeadRequest](docs/UpdateLeadRequest.md)
1185+
- [Pipedrive.UpdatePerson](docs/UpdatePerson.md)
1186+
- [Pipedrive.UpdatePersonAllOf](docs/UpdatePersonAllOf.md)
11851187
- [Pipedrive.UpdatePersonResponse](docs/UpdatePersonResponse.md)
11861188
- [Pipedrive.UpdateProductField](docs/UpdateProductField.md)
11871189
- [Pipedrive.UpdateProductRequestBody](docs/UpdateProductRequestBody.md)

docs/BasicPerson.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**name** | **String** | The name of the person |
87
**ownerId** | **Number** | The ID of the user who will be marked as the owner of this person. When omitted, the authorized user ID will be used. | [optional]
98
**orgId** | **Number** | The ID of the organization this person will belong to | [optional]
109
**email** | [**[BasicPersonEmail]**](BasicPersonEmail.md) | List of email data related to the person | [optional]
1110
**phone** | [**[BasePersonItemPhone]**](BasePersonItemPhone.md) | List of phone data related to the person | [optional]
1211
**visibleTo** | [**VisibleTo**](VisibleTo.md) | The visibility of the person. 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>Essential / Advanced plan</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>Professional / Enterprise 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]
1312
**marketingStatus** | [**MarketingStatus**](MarketingStatus.md) | If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` 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.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`no_consent`</td><td>The customer has not given consent to receive any marketing communications</td></tr><tr><td>`unsubscribed`</td><td>The customers have unsubscribed from ALL marketing communications</td></tr><tr><td>`subscribed`</td><td>The customers are subscribed and are counted towards marketing caps</td></tr><tr><td>`archived`</td><td>The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for</td></tr></table> | [optional]
13+
**addTime** | **String** | The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS | [optional]
1414

1515

docs/NewPersonAllOf.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**addTime** | **String** | The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS | [optional]
7+
**name** | **String** | The name of the person |
88

99

docs/PersonsApi.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1151,7 +1151,7 @@ oauth2.accessToken = 'YOUR ACCESS TOKEN';
11511151

11521152
let apiInstance = new Pipedrive.PersonsApi();
11531153
let id = 56; // Number | The ID of the person
1154-
let opts = Pipedrive.BasicPerson.constructFromObject({
1154+
let opts = Pipedrive.UpdatePerson.constructFromObject({
11551155
// Properties that you want to update
11561156
});
11571157
apiInstance.updatePerson(id, opts).then((data) => {
@@ -1168,7 +1168,7 @@ apiInstance.updatePerson(id, opts).then((data) => {
11681168
Name | Type | Description | Notes
11691169
------------- | ------------- | ------------- | -------------
11701170
**id** | **Number**| The ID of the person |
1171-
**basicPerson** | [**BasicPerson**](BasicPerson.md)| | [optional]
1171+
**updatePerson** | [**UpdatePerson**](UpdatePerson.md)| | [optional]
11721172

11731173
### Return type
11741174

docs/UpdatePerson.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Pipedrive.UpdatePerson
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **String** | The name of the person | [optional]
8+
**ownerId** | **Number** | The ID of the user who will be marked as the owner of this person. When omitted, the authorized user ID will be used. | [optional]
9+
**orgId** | **Number** | The ID of the organization this person will belong to | [optional]
10+
**email** | [**[BasicPersonEmail]**](BasicPersonEmail.md) | List of email data related to the person | [optional]
11+
**phone** | [**[BasePersonItemPhone]**](BasePersonItemPhone.md) | List of phone data related to the person | [optional]
12+
**visibleTo** | [**VisibleTo**](VisibleTo.md) | The visibility of the person. 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>Essential / Advanced plan</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>Professional / Enterprise 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]
13+
**marketingStatus** | [**MarketingStatus**](MarketingStatus.md) | If the person does not have a valid email address, then the marketing status is **not set** and `no_consent` is returned for the `marketing_status` 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.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`no_consent`</td><td>The customer has not given consent to receive any marketing communications</td></tr><tr><td>`unsubscribed`</td><td>The customers have unsubscribed from ALL marketing communications</td></tr><tr><td>`subscribed`</td><td>The customers are subscribed and are counted towards marketing caps</td></tr><tr><td>`archived`</td><td>The customers with `subscribed` status can be moved to `archived` to save consent, but they are not paid for</td></tr></table> | [optional]
14+
**addTime** | **String** | The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS | [optional]
15+
16+

docs/UpdatePersonAllOf.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Pipedrive.UpdatePersonAllOf
2+
3+
## Properties
4+
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**name** | **String** | The name of the person | [optional]
8+
9+

src/api/PersonsApi.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import AddFollowerToPersonResponse from '../model/AddFollowerToPersonResponse';
1717
import AddPersonFollowerRequest from '../model/AddPersonFollowerRequest';
1818
import AddPersonPictureResponse from '../model/AddPersonPictureResponse';
1919
import AddPersonResponse from '../model/AddPersonResponse';
20-
import BasicPerson from '../model/BasicPerson';
2120
import DeletePersonResponse from '../model/DeletePersonResponse';
2221
import DeletePersonsInBulkResponse from '../model/DeletePersonsInBulkResponse';
2322
import GetAllPersonsResponse from '../model/GetAllPersonsResponse';
@@ -35,6 +34,7 @@ import NewPerson from '../model/NewPerson';
3534
import NumberBoolean from '../model/NumberBoolean';
3635
import PersonFlowResponse from '../model/PersonFlowResponse';
3736
import PersonSearchResponse from '../model/PersonSearchResponse';
37+
import UpdatePerson from '../model/UpdatePerson';
3838
import UpdatePersonResponse from '../model/UpdatePersonResponse';
3939

4040
/**
@@ -1504,21 +1504,18 @@ export default class PersonsApi {
15041504
* Updates the properties of a person. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/updating-a-person\" target=\"_blank\" rel=\"noopener noreferrer\">updating a person</a>.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
15051505
* @param {Number} id The ID of the person
15061506
* @param {Object} opts Optional parameters
1507-
* @param {module:model/BasicPerson} opts.basicPerson
1507+
* @param {module:model/UpdatePerson} opts.updatePerson
15081508
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/UpdatePersonResponse} and HTTP response
15091509
*/
15101510
updatePersonWithHttpInfo(id, opts) {
15111511
opts = opts || {};
1512-
let postBody = opts['basicPerson'];
1512+
let postBody = opts['updatePerson'];
15131513

15141514
// verify the required parameter 'id' is set
15151515
if (id === undefined || id === null) {
15161516
throw new Error("Missing the required parameter 'id' when calling updatePerson");
15171517
}
15181518

1519-
if (opts['name'] === undefined || opts['name'] === null) {
1520-
throw new Error("Missing the required parameter 'name' when calling updatePerson");
1521-
}
15221519

15231520
let pathParams = {
15241521
'id': id,
@@ -1562,7 +1559,7 @@ export default class PersonsApi {
15621559
* Updates the properties of a person. For more information, see the tutorial for <a href=\"https://pipedrive.readme.io/docs/updating-a-person\" target=\"_blank\" rel=\"noopener noreferrer\">updating a person</a>.<br>If a company uses the [Campaigns product](https://pipedrive.readme.io/docs/campaigns-in-pipedrive-api), then this endpoint will also accept and return the `data.marketing_status` field.
15631560
* @param {Number} id The ID of the person
15641561
* @param {Object} opts Optional parameters
1565-
* @param {module:model/BasicPerson} opts.basicPerson
1562+
* @param {module:model/UpdatePerson} opts.updatePerson
15661563
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/UpdatePersonResponse}
15671564
*/
15681565
updatePerson(id, opts) {

src/index.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,8 @@ import UpdateFile from './model/UpdateFile';
682682
import UpdateFilterRequest from './model/UpdateFilterRequest';
683683
import UpdateLeadLabelRequest from './model/UpdateLeadLabelRequest';
684684
import UpdateLeadRequest from './model/UpdateLeadRequest';
685+
import UpdatePerson from './model/UpdatePerson';
686+
import UpdatePersonAllOf from './model/UpdatePersonAllOf';
685687
import UpdatePersonResponse from './model/UpdatePersonResponse';
686688
import UpdateProductField from './model/UpdateProductField';
687689
import UpdateProductRequestBody from './model/UpdateProductRequestBody';
@@ -4814,6 +4816,18 @@ export {
48144816
*/
48154817
UpdateLeadRequest,
48164818

4819+
/**
4820+
* The UpdatePerson model constructor.
4821+
* @property {module:model/UpdatePerson}
4822+
*/
4823+
UpdatePerson,
4824+
4825+
/**
4826+
* The UpdatePersonAllOf model constructor.
4827+
* @property {module:model/UpdatePersonAllOf}
4828+
*/
4829+
UpdatePersonAllOf,
4830+
48174831
/**
48184832
* The UpdatePersonResponse model constructor.
48194833
* @property {module:model/UpdatePersonResponse}

src/model/BasicPerson.js

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,18 @@ class BasicPerson {
2626
/**
2727
* Constructs a new <code>BasicPerson</code>.
2828
* @alias module:model/BasicPerson
29-
* @param name {String} The name of the person
3029
*/
31-
constructor(name) {
30+
constructor() {
3231

33-
BasicPerson.initialize(this, name);
32+
BasicPerson.initialize(this);
3433
}
3534

3635
/**
3736
* Initializes the fields of this object.
3837
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
3938
* Only for internal use.
4039
*/
41-
static initialize(obj, name) {
42-
obj['name'] = name;
40+
static initialize(obj) {
4341
}
4442

4543
/**
@@ -53,11 +51,6 @@ class BasicPerson {
5351
if (data) {
5452
obj = obj || new BasicPerson();
5553

56-
if (data.hasOwnProperty('name')) {
57-
obj['name'] = ApiClient.convertToType(data['name'], 'String');
58-
59-
delete data['name'];
60-
}
6154
if (data.hasOwnProperty('owner_id')) {
6255
obj['owner_id'] = ApiClient.convertToType(data['owner_id'], 'Number');
6356

@@ -88,6 +81,11 @@ class BasicPerson {
8881

8982
delete data['marketing_status'];
9083
}
84+
if (data.hasOwnProperty('add_time')) {
85+
obj['add_time'] = ApiClient.convertToType(data['add_time'], 'String');
86+
87+
delete data['add_time'];
88+
}
9189

9290
if (Object.keys(data).length > 0) {
9391
Object.assign(obj, data);
@@ -100,12 +98,6 @@ class BasicPerson {
10098

10199
}
102100

103-
/**
104-
* The name of the person
105-
* @member {String} name
106-
*/
107-
BasicPerson.prototype['name'] = undefined;
108-
109101
/**
110102
* The ID of the user who will be marked as the owner of this person. When omitted, the authorized user ID will be used.
111103
* @member {Number} owner_id
@@ -142,6 +134,12 @@ BasicPerson.prototype['visible_to'] = undefined;
142134
*/
143135
BasicPerson.prototype['marketing_status'] = undefined;
144136

137+
/**
138+
* The optional creation date & time of the person in UTC. Requires admin user API token. Format: YYYY-MM-DD HH:MM:SS
139+
* @member {String} add_time
140+
*/
141+
BasicPerson.prototype['add_time'] = undefined;
142+
145143

146144

147145

0 commit comments

Comments
 (0)