pipedrive 13.2.4 → 13.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +12 -1
  3. package/dist/api/DealsApi.js +8 -0
  4. package/dist/api/LeadsApi.js +92 -1
  5. package/dist/api/OrganizationsApi.js +4 -0
  6. package/dist/api/PersonsApi.js +17 -10
  7. package/dist/api/ProductsApi.js +5 -5
  8. package/dist/api/StagesApi.js +11 -5
  9. package/dist/index.js +88 -8
  10. package/dist/model/ActivityObjectFragment.js +11 -0
  11. package/dist/model/ActivityPostObject.js +17 -0
  12. package/dist/model/ActivityPutObject.js +17 -0
  13. package/dist/model/ActivityResponseObject.js +17 -11
  14. package/dist/model/AddLeadRequest.js +1 -1
  15. package/dist/model/AddNoteRequest.js +7 -4
  16. package/dist/model/AddProductAttachmentDetails.js +11 -4
  17. package/dist/model/AddProductRequestBody.js +16 -5
  18. package/dist/model/BasicDeal.js +33 -7
  19. package/dist/model/BasicDealProduct.js +8 -3
  20. package/dist/model/BasicOrganization.js +6 -3
  21. package/dist/model/BasicPerson.js +6 -3
  22. package/dist/model/FilterType.js +1 -0
  23. package/dist/model/LeadSearchItem.js +102 -0
  24. package/dist/model/LeadSearchItemItem.js +234 -0
  25. package/dist/model/LeadSearchItemItemOrganization.js +101 -0
  26. package/dist/model/LeadSearchItemItemOwner.js +90 -0
  27. package/dist/model/LeadSearchItemItemPerson.js +101 -0
  28. package/dist/model/LeadSearchResponse.js +147 -0
  29. package/dist/model/LeadSearchResponseAllOf.js +103 -0
  30. package/dist/model/LeadSearchResponseAllOfData.js +92 -0
  31. package/dist/model/NewDeal.js +40 -8
  32. package/dist/model/NewDealProduct.js +6 -33
  33. package/dist/model/NewOrganization.js +1 -1
  34. package/dist/model/NewPerson.js +1 -1
  35. package/dist/model/Note.js +1 -1
  36. package/dist/model/NoteParams.js +6 -3
  37. package/dist/model/OptionalNameObject.js +90 -0
  38. package/dist/model/ProductAttachmentDetails.js +11 -4
  39. package/dist/model/ProductRequest.js +1 -12
  40. package/dist/model/RequiredNameObject.js +93 -0
  41. package/dist/model/UpdateDealRequest.js +40 -8
  42. package/dist/model/UpdateLeadRequest.js +1 -1
  43. package/dist/model/UpdateProductRequestBody.js +254 -0
  44. package/package.json +1 -1
@@ -99,6 +99,11 @@ var ActivityResponseObject = /*#__PURE__*/function () {
99
99
  delete data['deal_id'];
100
100
  }
101
101
 
102
+ if (data.hasOwnProperty('lead_id')) {
103
+ obj['lead_id'] = _ApiClient["default"].convertToType(data['lead_id'], 'String');
104
+ delete data['lead_id'];
105
+ }
106
+
102
107
  if (data.hasOwnProperty('person_id')) {
103
108
  obj['person_id'] = _ApiClient["default"].convertToType(data['person_id'], 'Number');
104
109
  delete data['person_id'];
@@ -219,11 +224,6 @@ var ActivityResponseObject = /*#__PURE__*/function () {
219
224
  delete data['notification_language_id'];
220
225
  }
221
226
 
222
- if (data.hasOwnProperty('lead_id')) {
223
- obj['lead_id'] = _ApiClient["default"].convertToType(data['lead_id'], 'String');
224
- delete data['lead_id'];
225
- }
226
-
227
227
  if (data.hasOwnProperty('active_flag')) {
228
228
  obj['active_flag'] = _ApiClient["default"].convertToType(data['active_flag'], 'Boolean');
229
229
  delete data['active_flag'];
@@ -424,6 +424,12 @@ ActivityResponseObject.prototype['duration'] = undefined;
424
424
  */
425
425
 
426
426
  ActivityResponseObject.prototype['deal_id'] = undefined;
427
+ /**
428
+ * The ID of the lead in the UUID format this activity is associated with
429
+ * @member {String} lead_id
430
+ */
431
+
432
+ ActivityResponseObject.prototype['lead_id'] = undefined;
427
433
  /**
428
434
  * The ID of the person this activity is associated with
429
435
  * @member {Number} person_id
@@ -568,12 +574,6 @@ ActivityResponseObject.prototype['last_notification_user_id'] = undefined;
568
574
  */
569
575
 
570
576
  ActivityResponseObject.prototype['notification_language_id'] = undefined;
571
- /**
572
- * The ID of the lead in the UUID format this activity is associated with
573
- * @member {String} lead_id
574
- */
575
-
576
- ActivityResponseObject.prototype['lead_id'] = undefined;
577
577
  /**
578
578
  * Whether the activity is active or not
579
579
  * @member {Boolean} active_flag
@@ -797,6 +797,12 @@ _ActivityObjectFragment["default"].prototype['duration'] = undefined;
797
797
  */
798
798
 
799
799
  _ActivityObjectFragment["default"].prototype['deal_id'] = undefined;
800
+ /**
801
+ * The ID of the lead this activity is associated with
802
+ * @member {String} lead_id
803
+ */
804
+
805
+ _ActivityObjectFragment["default"].prototype['lead_id'] = undefined;
800
806
  /**
801
807
  * The ID of the person this activity is associated with
802
808
  * @member {Number} person_id
@@ -169,7 +169,7 @@ AddLeadRequest.prototype['value'] = undefined;
169
169
 
170
170
  AddLeadRequest.prototype['expected_close_date'] = undefined;
171
171
  /**
172
- * The visibility of the lead. If omitted, the visibility will be set to the default visibility setting of this item type for the authorized user.<table><tr><th>Value</th><th>Description</th></tr><tr><td>`1`</td><td>Owner &amp; followers (private)</td></tr><tr><td>`3`</td><td>Entire company (shared)</td></tr></table>
172
+ * The visibility of the lead. 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 &amp; 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>
173
173
  * @member {module:model/VisibleTo} visible_to
174
174
  */
175
175
 
@@ -43,15 +43,16 @@ var AddNoteRequest = /*#__PURE__*/function () {
43
43
  * @alias module:model/AddNoteRequest
44
44
  * @implements module:model/AddNoteRequestAllOf
45
45
  * @implements module:model/NoteParams
46
+ * @param content {String} The content of the note in HTML format. Subject to sanitization on the back-end.
46
47
  */
47
- function AddNoteRequest() {
48
+ function AddNoteRequest(content) {
48
49
  (0, _classCallCheck2["default"])(this, AddNoteRequest);
49
50
 
50
51
  _AddNoteRequestAllOf["default"].initialize(this);
51
52
 
52
- _NoteParams["default"].initialize(this);
53
+ _NoteParams["default"].initialize(this, content);
53
54
 
54
- AddNoteRequest.initialize(this);
55
+ AddNoteRequest.initialize(this, content);
55
56
  }
56
57
  /**
57
58
  * Initializes the fields of this object.
@@ -62,7 +63,9 @@ var AddNoteRequest = /*#__PURE__*/function () {
62
63
 
63
64
  (0, _createClass2["default"])(AddNoteRequest, null, [{
64
65
  key: "initialize",
65
- value: function initialize(obj) {}
66
+ value: function initialize(obj, content) {
67
+ obj['content'] = content;
68
+ }
66
69
  /**
67
70
  * Constructs a <code>AddNoteRequest</code> from a plain JavaScript object, optionally creating a new instance.
68
71
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
@@ -43,15 +43,18 @@ var AddProductAttachmentDetails = /*#__PURE__*/function () {
43
43
  * @alias module:model/AddProductAttachmentDetails
44
44
  * @implements module:model/ProductAttachmentDetails
45
45
  * @implements module:model/AddProductAttachmentDetailsAllOf
46
+ * @param itemPrice {Number} The price at which this product will be added to the deal
47
+ * @param quantity {Number} Quantity – e.g. how many items of this product will be added to the deal
48
+ * @param productId {Number} The ID of the product
46
49
  */
47
- function AddProductAttachmentDetails() {
50
+ function AddProductAttachmentDetails(itemPrice, quantity, productId) {
48
51
  (0, _classCallCheck2["default"])(this, AddProductAttachmentDetails);
49
52
 
50
- _ProductAttachmentDetails["default"].initialize(this);
53
+ _ProductAttachmentDetails["default"].initialize(this, itemPrice, quantity, productId);
51
54
 
52
55
  _AddProductAttachmentDetailsAllOf["default"].initialize(this);
53
56
 
54
- AddProductAttachmentDetails.initialize(this);
57
+ AddProductAttachmentDetails.initialize(this, itemPrice, quantity, productId);
55
58
  }
56
59
  /**
57
60
  * Initializes the fields of this object.
@@ -62,7 +65,11 @@ var AddProductAttachmentDetails = /*#__PURE__*/function () {
62
65
 
63
66
  (0, _createClass2["default"])(AddProductAttachmentDetails, null, [{
64
67
  key: "initialize",
65
- value: function initialize(obj) {}
68
+ value: function initialize(obj, itemPrice, quantity, productId) {
69
+ obj['item_price'] = itemPrice;
70
+ obj['quantity'] = quantity;
71
+ obj['product_id'] = productId;
72
+ }
66
73
  /**
67
74
  * Constructs a <code>AddProductAttachmentDetails</code> from a plain JavaScript object, optionally creating a new instance.
68
75
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
@@ -17,6 +17,8 @@ var _NumberBooleanDefault = _interopRequireDefault(require("./NumberBooleanDefau
17
17
 
18
18
  var _ProductRequest = _interopRequireDefault(require("./ProductRequest"));
19
19
 
20
+ var _RequiredNameObject = _interopRequireDefault(require("./RequiredNameObject"));
21
+
20
22
  var _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
21
23
 
22
24
  /**
@@ -41,14 +43,18 @@ var AddProductRequestBody = /*#__PURE__*/function () {
41
43
  /**
42
44
  * Constructs a new <code>AddProductRequestBody</code>.
43
45
  * @alias module:model/AddProductRequestBody
46
+ * @implements module:model/RequiredNameObject
44
47
  * @implements module:model/ProductRequest
48
+ * @param name {String} The name of the product
45
49
  */
46
- function AddProductRequestBody() {
50
+ function AddProductRequestBody(name) {
47
51
  (0, _classCallCheck2["default"])(this, AddProductRequestBody);
48
52
 
53
+ _RequiredNameObject["default"].initialize(this, name);
54
+
49
55
  _ProductRequest["default"].initialize(this);
50
56
 
51
- AddProductRequestBody.initialize(this);
57
+ AddProductRequestBody.initialize(this, name);
52
58
  }
53
59
  /**
54
60
  * Initializes the fields of this object.
@@ -59,7 +65,9 @@ var AddProductRequestBody = /*#__PURE__*/function () {
59
65
 
60
66
  (0, _createClass2["default"])(AddProductRequestBody, null, [{
61
67
  key: "initialize",
62
- value: function initialize(obj) {}
68
+ value: function initialize(obj, name) {
69
+ obj['name'] = name;
70
+ }
63
71
  /**
64
72
  * Constructs a <code>AddProductRequestBody</code> from a plain JavaScript object, optionally creating a new instance.
65
73
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
@@ -74,6 +82,8 @@ var AddProductRequestBody = /*#__PURE__*/function () {
74
82
  if (data) {
75
83
  obj = obj || new AddProductRequestBody();
76
84
 
85
+ _RequiredNameObject["default"].constructFromObject(data, obj);
86
+
77
87
  _ProductRequest["default"].constructFromObject(data, obj);
78
88
 
79
89
  if (data.hasOwnProperty('name')) {
@@ -184,14 +194,15 @@ AddProductRequestBody.prototype['owner_id'] = undefined;
184
194
  * @member {Array.<Object>} prices
185
195
  */
186
196
 
187
- AddProductRequestBody.prototype['prices'] = undefined; // Implement ProductRequest interface:
197
+ AddProductRequestBody.prototype['prices'] = undefined; // Implement RequiredNameObject interface:
188
198
 
189
199
  /**
190
200
  * The name of the product
191
201
  * @member {String} name
192
202
  */
193
203
 
194
- _ProductRequest["default"].prototype['name'] = undefined;
204
+ _RequiredNameObject["default"].prototype['name'] = undefined; // Implement ProductRequest interface:
205
+
195
206
  /**
196
207
  * The product code
197
208
  * @member {String} code
@@ -7,8 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  });
8
8
  exports["default"] = void 0;
9
9
 
10
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
-
12
10
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
13
11
 
14
12
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
@@ -17,7 +15,18 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
17
15
 
18
16
  var _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
19
17
 
20
- var _BasicDeal$StatusEnum;
18
+ /**
19
+ * Pipedrive API v1
20
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21
+ *
22
+ * The version of the OpenAPI document: 1.0.0
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
21
30
 
22
31
  /**
23
32
  * The BasicDeal model module.
@@ -82,6 +91,11 @@ var BasicDeal = /*#__PURE__*/function () {
82
91
  delete data['org_id'];
83
92
  }
84
93
 
94
+ if (data.hasOwnProperty('pipeline_id')) {
95
+ obj['pipeline_id'] = _ApiClient["default"].convertToType(data['pipeline_id'], 'Number');
96
+ delete data['pipeline_id'];
97
+ }
98
+
85
99
  if (data.hasOwnProperty('stage_id')) {
86
100
  obj['stage_id'] = _ApiClient["default"].convertToType(data['stage_id'], 'Number');
87
101
  delete data['stage_id'];
@@ -154,7 +168,13 @@ BasicDeal.prototype['person_id'] = undefined;
154
168
 
155
169
  BasicDeal.prototype['org_id'] = undefined;
156
170
  /**
157
- * The ID of a stage this deal will be placed in a pipeline (note that you can't supply the ID of the pipeline as this will be assigned automatically based on `stage_id`). If omitted, the deal will be placed in the first stage of the default pipeline.
171
+ * The ID of the pipeline this deal will be added to. By default, the deal will be added to the first stage of the specified pipeline. Please note that `pipeline_id` and `stage_id` should not be used together as `pipeline_id` will be ignored.
172
+ * @member {Number} pipeline_id
173
+ */
174
+
175
+ BasicDeal.prototype['pipeline_id'] = undefined;
176
+ /**
177
+ * The ID of the stage this deal will be added to. Please note that a pipeline will be assigned automatically based on the `stage_id`. If omitted, the deal will be placed in the first stage of the default pipeline.
158
178
  * @member {Number} stage_id
159
179
  */
160
180
 
@@ -195,7 +215,7 @@ BasicDeal.prototype['visible_to'] = undefined;
195
215
  * @readonly
196
216
  */
197
217
 
198
- BasicDeal['StatusEnum'] = (_BasicDeal$StatusEnum = {
218
+ BasicDeal['StatusEnum'] = {
199
219
  /**
200
220
  * value: "open"
201
221
  * @const
@@ -212,7 +232,13 @@ BasicDeal['StatusEnum'] = (_BasicDeal$StatusEnum = {
212
232
  * value: "lost"
213
233
  * @const
214
234
  */
215
- "lost": "lost"
216
- }, (0, _defineProperty2["default"])(_BasicDeal$StatusEnum, "lost", "lost"), (0, _defineProperty2["default"])(_BasicDeal$StatusEnum, "deleted", "deleted"), _BasicDeal$StatusEnum);
235
+ "lost": "lost",
236
+
237
+ /**
238
+ * value: "deleted"
239
+ * @const
240
+ */
241
+ "deleted": "deleted"
242
+ };
217
243
  var _default = BasicDeal;
218
244
  exports["default"] = _default;
@@ -37,10 +37,12 @@ var BasicDealProduct = /*#__PURE__*/function () {
37
37
  /**
38
38
  * Constructs a new <code>BasicDealProduct</code>.
39
39
  * @alias module:model/BasicDealProduct
40
+ * @param itemPrice {Number} The price at which this product will be added to the deal
41
+ * @param quantity {Number} Quantity – e.g. how many items of this product will be added to the deal
40
42
  */
41
- function BasicDealProduct() {
43
+ function BasicDealProduct(itemPrice, quantity) {
42
44
  (0, _classCallCheck2["default"])(this, BasicDealProduct);
43
- BasicDealProduct.initialize(this);
45
+ BasicDealProduct.initialize(this, itemPrice, quantity);
44
46
  }
45
47
  /**
46
48
  * Initializes the fields of this object.
@@ -51,7 +53,10 @@ var BasicDealProduct = /*#__PURE__*/function () {
51
53
 
52
54
  (0, _createClass2["default"])(BasicDealProduct, null, [{
53
55
  key: "initialize",
54
- value: function initialize(obj) {}
56
+ value: function initialize(obj, itemPrice, quantity) {
57
+ obj['item_price'] = itemPrice;
58
+ obj['quantity'] = quantity;
59
+ }
55
60
  /**
56
61
  * Constructs a <code>BasicDealProduct</code> from a plain JavaScript object, optionally creating a new instance.
57
62
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
@@ -37,10 +37,11 @@ var BasicOrganization = /*#__PURE__*/function () {
37
37
  /**
38
38
  * Constructs a new <code>BasicOrganization</code>.
39
39
  * @alias module:model/BasicOrganization
40
+ * @param name {String} The name of the organization
40
41
  */
41
- function BasicOrganization() {
42
+ function BasicOrganization(name) {
42
43
  (0, _classCallCheck2["default"])(this, BasicOrganization);
43
- BasicOrganization.initialize(this);
44
+ BasicOrganization.initialize(this, name);
44
45
  }
45
46
  /**
46
47
  * Initializes the fields of this object.
@@ -51,7 +52,9 @@ var BasicOrganization = /*#__PURE__*/function () {
51
52
 
52
53
  (0, _createClass2["default"])(BasicOrganization, null, [{
53
54
  key: "initialize",
54
- value: function initialize(obj) {}
55
+ value: function initialize(obj, name) {
56
+ obj['name'] = name;
57
+ }
55
58
  /**
56
59
  * Constructs a <code>BasicOrganization</code> from a plain JavaScript object, optionally creating a new instance.
57
60
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
@@ -43,10 +43,11 @@ var BasicPerson = /*#__PURE__*/function () {
43
43
  /**
44
44
  * Constructs a new <code>BasicPerson</code>.
45
45
  * @alias module:model/BasicPerson
46
+ * @param name {String} The name of the person
46
47
  */
47
- function BasicPerson() {
48
+ function BasicPerson(name) {
48
49
  (0, _classCallCheck2["default"])(this, BasicPerson);
49
- BasicPerson.initialize(this);
50
+ BasicPerson.initialize(this, name);
50
51
  }
51
52
  /**
52
53
  * Initializes the fields of this object.
@@ -57,7 +58,9 @@ var BasicPerson = /*#__PURE__*/function () {
57
58
 
58
59
  (0, _createClass2["default"])(BasicPerson, null, [{
59
60
  key: "initialize",
60
- value: function initialize(obj) {}
61
+ value: function initialize(obj, name) {
62
+ obj['name'] = name;
63
+ }
61
64
  /**
62
65
  * Constructs a <code>BasicPerson</code> from a plain JavaScript object, optionally creating a new instance.
63
66
  * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
@@ -37,6 +37,7 @@ var FilterType = /*#__PURE__*/function () {
37
37
  function FilterType() {
38
38
  (0, _classCallCheck2["default"])(this, FilterType);
39
39
  (0, _defineProperty2["default"])(this, "deals", "deals");
40
+ (0, _defineProperty2["default"])(this, "leads", "leads");
40
41
  (0, _defineProperty2["default"])(this, "org", "org");
41
42
  (0, _defineProperty2["default"])(this, "people", "people");
42
43
  (0, _defineProperty2["default"])(this, "products", "products");
@@ -0,0 +1,102 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+
14
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
15
+
16
+ var _LeadSearchItemItem = _interopRequireDefault(require("./LeadSearchItemItem"));
17
+
18
+ /**
19
+ * Pipedrive API v1
20
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
21
+ *
22
+ * The version of the OpenAPI document: 1.0.0
23
+ *
24
+ *
25
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
26
+ * https://openapi-generator.tech
27
+ * Do not edit the class manually.
28
+ *
29
+ */
30
+
31
+ /**
32
+ * The LeadSearchItem model module.
33
+ * @module model/LeadSearchItem
34
+ * @version 1.0.0
35
+ */
36
+ var LeadSearchItem = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>LeadSearchItem</code>.
39
+ * @alias module:model/LeadSearchItem
40
+ */
41
+ function LeadSearchItem() {
42
+ (0, _classCallCheck2["default"])(this, LeadSearchItem);
43
+ LeadSearchItem.initialize(this);
44
+ }
45
+ /**
46
+ * Initializes the fields of this object.
47
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
48
+ * Only for internal use.
49
+ */
50
+
51
+
52
+ (0, _createClass2["default"])(LeadSearchItem, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj) {}
55
+ /**
56
+ * Constructs a <code>LeadSearchItem</code> from a plain JavaScript object, optionally creating a new instance.
57
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
58
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
59
+ * @param {module:model/LeadSearchItem} obj Optional instance to populate.
60
+ * @return {module:model/LeadSearchItem} The populated <code>LeadSearchItem</code> instance.
61
+ */
62
+
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new LeadSearchItem();
68
+
69
+ if (data.hasOwnProperty('result_score')) {
70
+ obj['result_score'] = _ApiClient["default"].convertToType(data['result_score'], 'Number');
71
+ delete data['result_score'];
72
+ }
73
+
74
+ if (data.hasOwnProperty('item')) {
75
+ obj['item'] = _LeadSearchItemItem["default"].constructFromObject(data['item']);
76
+ delete data['item'];
77
+ }
78
+
79
+ if (Object.keys(data).length > 0) {
80
+ Object.assign(obj, data);
81
+ }
82
+ }
83
+
84
+ return obj;
85
+ }
86
+ }]);
87
+ return LeadSearchItem;
88
+ }();
89
+ /**
90
+ * Search result relevancy
91
+ * @member {Number} result_score
92
+ */
93
+
94
+
95
+ LeadSearchItem.prototype['result_score'] = undefined;
96
+ /**
97
+ * @member {module:model/LeadSearchItemItem} item
98
+ */
99
+
100
+ LeadSearchItem.prototype['item'] = undefined;
101
+ var _default = LeadSearchItem;
102
+ exports["default"] = _default;