pipedrive 13.2.4 → 13.2.7

Sign up to get free protection for your applications and to get access to all the features.
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
@@ -0,0 +1,103 @@
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 _ItemSearchAdditionalData = _interopRequireDefault(require("./ItemSearchAdditionalData"));
17
+
18
+ var _LeadSearchResponseAllOfData = _interopRequireDefault(require("./LeadSearchResponseAllOfData"));
19
+
20
+ /**
21
+ * Pipedrive API v1
22
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
23
+ *
24
+ * The version of the OpenAPI document: 1.0.0
25
+ *
26
+ *
27
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
28
+ * https://openapi-generator.tech
29
+ * Do not edit the class manually.
30
+ *
31
+ */
32
+
33
+ /**
34
+ * The LeadSearchResponseAllOf model module.
35
+ * @module model/LeadSearchResponseAllOf
36
+ * @version 1.0.0
37
+ */
38
+ var LeadSearchResponseAllOf = /*#__PURE__*/function () {
39
+ /**
40
+ * Constructs a new <code>LeadSearchResponseAllOf</code>.
41
+ * @alias module:model/LeadSearchResponseAllOf
42
+ */
43
+ function LeadSearchResponseAllOf() {
44
+ (0, _classCallCheck2["default"])(this, LeadSearchResponseAllOf);
45
+ LeadSearchResponseAllOf.initialize(this);
46
+ }
47
+ /**
48
+ * Initializes the fields of this object.
49
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
50
+ * Only for internal use.
51
+ */
52
+
53
+
54
+ (0, _createClass2["default"])(LeadSearchResponseAllOf, null, [{
55
+ key: "initialize",
56
+ value: function initialize(obj) {}
57
+ /**
58
+ * Constructs a <code>LeadSearchResponseAllOf</code> from a plain JavaScript object, optionally creating a new instance.
59
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
60
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
61
+ * @param {module:model/LeadSearchResponseAllOf} obj Optional instance to populate.
62
+ * @return {module:model/LeadSearchResponseAllOf} The populated <code>LeadSearchResponseAllOf</code> instance.
63
+ */
64
+
65
+ }, {
66
+ key: "constructFromObject",
67
+ value: function constructFromObject(data, obj) {
68
+ if (data) {
69
+ obj = obj || new LeadSearchResponseAllOf();
70
+
71
+ if (data.hasOwnProperty('data')) {
72
+ obj['data'] = _LeadSearchResponseAllOfData["default"].constructFromObject(data['data']);
73
+ delete data['data'];
74
+ }
75
+
76
+ if (data.hasOwnProperty('additional_data')) {
77
+ obj['additional_data'] = _ItemSearchAdditionalData["default"].constructFromObject(data['additional_data']);
78
+ delete data['additional_data'];
79
+ }
80
+
81
+ if (Object.keys(data).length > 0) {
82
+ Object.assign(obj, data);
83
+ }
84
+ }
85
+
86
+ return obj;
87
+ }
88
+ }]);
89
+ return LeadSearchResponseAllOf;
90
+ }();
91
+ /**
92
+ * @member {module:model/LeadSearchResponseAllOfData} data
93
+ */
94
+
95
+
96
+ LeadSearchResponseAllOf.prototype['data'] = undefined;
97
+ /**
98
+ * @member {module:model/ItemSearchAdditionalData} additional_data
99
+ */
100
+
101
+ LeadSearchResponseAllOf.prototype['additional_data'] = undefined;
102
+ var _default = LeadSearchResponseAllOf;
103
+ exports["default"] = _default;
@@ -0,0 +1,92 @@
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 _LeadSearchItem = _interopRequireDefault(require("./LeadSearchItem"));
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 LeadSearchResponseAllOfData model module.
33
+ * @module model/LeadSearchResponseAllOfData
34
+ * @version 1.0.0
35
+ */
36
+ var LeadSearchResponseAllOfData = /*#__PURE__*/function () {
37
+ /**
38
+ * Constructs a new <code>LeadSearchResponseAllOfData</code>.
39
+ * @alias module:model/LeadSearchResponseAllOfData
40
+ */
41
+ function LeadSearchResponseAllOfData() {
42
+ (0, _classCallCheck2["default"])(this, LeadSearchResponseAllOfData);
43
+ LeadSearchResponseAllOfData.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"])(LeadSearchResponseAllOfData, null, [{
53
+ key: "initialize",
54
+ value: function initialize(obj) {}
55
+ /**
56
+ * Constructs a <code>LeadSearchResponseAllOfData</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/LeadSearchResponseAllOfData} obj Optional instance to populate.
60
+ * @return {module:model/LeadSearchResponseAllOfData} The populated <code>LeadSearchResponseAllOfData</code> instance.
61
+ */
62
+
63
+ }, {
64
+ key: "constructFromObject",
65
+ value: function constructFromObject(data, obj) {
66
+ if (data) {
67
+ obj = obj || new LeadSearchResponseAllOfData();
68
+
69
+ if (data.hasOwnProperty('items')) {
70
+ obj['items'] = _ApiClient["default"].convertToType(data['items'], [_LeadSearchItem["default"]]);
71
+ delete data['items'];
72
+ }
73
+
74
+ if (Object.keys(data).length > 0) {
75
+ Object.assign(obj, data);
76
+ }
77
+ }
78
+
79
+ return obj;
80
+ }
81
+ }]);
82
+ return LeadSearchResponseAllOfData;
83
+ }();
84
+ /**
85
+ * The array of leads
86
+ * @member {Array.<module:model/LeadSearchItem>} items
87
+ */
88
+
89
+
90
+ LeadSearchResponseAllOfData.prototype['items'] = undefined;
91
+ var _default = LeadSearchResponseAllOfData;
92
+ exports["default"] = _default;
@@ -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"));
@@ -23,7 +21,18 @@ var _RequredTitleParameter = _interopRequireDefault(require("./RequredTitleParam
23
21
 
24
22
  var _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
25
23
 
26
- var _NewDeal$StatusEnum;
24
+ /**
25
+ * Pipedrive API v1
26
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
27
+ *
28
+ * The version of the OpenAPI document: 1.0.0
29
+ *
30
+ *
31
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
32
+ * https://openapi-generator.tech
33
+ * Do not edit the class manually.
34
+ *
35
+ */
27
36
 
28
37
  /**
29
38
  * The NewDeal model module.
@@ -112,6 +121,11 @@ var NewDeal = /*#__PURE__*/function () {
112
121
  delete data['org_id'];
113
122
  }
114
123
 
124
+ if (data.hasOwnProperty('pipeline_id')) {
125
+ obj['pipeline_id'] = _ApiClient["default"].convertToType(data['pipeline_id'], 'Number');
126
+ delete data['pipeline_id'];
127
+ }
128
+
115
129
  if (data.hasOwnProperty('stage_id')) {
116
130
  obj['stage_id'] = _ApiClient["default"].convertToType(data['stage_id'], 'Number');
117
131
  delete data['stage_id'];
@@ -195,7 +209,13 @@ NewDeal.prototype['person_id'] = undefined;
195
209
 
196
210
  NewDeal.prototype['org_id'] = undefined;
197
211
  /**
198
- * 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.
212
+ * 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.
213
+ * @member {Number} pipeline_id
214
+ */
215
+
216
+ NewDeal.prototype['pipeline_id'] = undefined;
217
+ /**
218
+ * 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.
199
219
  * @member {Number} stage_id
200
220
  */
201
221
 
@@ -275,7 +295,13 @@ _BasicDeal["default"].prototype['person_id'] = undefined;
275
295
 
276
296
  _BasicDeal["default"].prototype['org_id'] = undefined;
277
297
  /**
278
- * 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.
298
+ * 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.
299
+ * @member {Number} pipeline_id
300
+ */
301
+
302
+ _BasicDeal["default"].prototype['pipeline_id'] = undefined;
303
+ /**
304
+ * 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.
279
305
  * @member {Number} stage_id
280
306
  */
281
307
 
@@ -323,7 +349,7 @@ _NewDealAllOf["default"].prototype['add_time'] = undefined;
323
349
  * @readonly
324
350
  */
325
351
 
326
- NewDeal['StatusEnum'] = (_NewDeal$StatusEnum = {
352
+ NewDeal['StatusEnum'] = {
327
353
  /**
328
354
  * value: "open"
329
355
  * @const
@@ -340,7 +366,13 @@ NewDeal['StatusEnum'] = (_NewDeal$StatusEnum = {
340
366
  * value: "lost"
341
367
  * @const
342
368
  */
343
- "lost": "lost"
344
- }, (0, _defineProperty2["default"])(_NewDeal$StatusEnum, "lost", "lost"), (0, _defineProperty2["default"])(_NewDeal$StatusEnum, "deleted", "deleted"), _NewDeal$StatusEnum);
369
+ "lost": "lost",
370
+
371
+ /**
372
+ * value: "deleted"
373
+ * @const
374
+ */
375
+ "deleted": "deleted"
376
+ };
345
377
  var _default = NewDeal;
346
378
  exports["default"] = _default;
@@ -15,8 +15,6 @@ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
15
15
 
16
16
  var _BasicDealProduct = _interopRequireDefault(require("./BasicDealProduct"));
17
17
 
18
- var _NewDealProductAllOf = _interopRequireDefault(require("./NewDealProductAllOf"));
19
-
20
18
  var _NumberBoolean = _interopRequireDefault(require("./NumberBoolean"));
21
19
 
22
20
  /**
@@ -42,19 +40,15 @@ var NewDealProduct = /*#__PURE__*/function () {
42
40
  * Constructs a new <code>NewDealProduct</code>.
43
41
  * @alias module:model/NewDealProduct
44
42
  * @implements module:model/BasicDealProduct
45
- * @implements module:model/NewDealProductAllOf
46
43
  * @param itemPrice {Number} The price at which this product will be added to the deal
47
44
  * @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 that will be attached
49
45
  */
50
- function NewDealProduct(itemPrice, quantity, productId) {
46
+ function NewDealProduct(itemPrice, quantity) {
51
47
  (0, _classCallCheck2["default"])(this, NewDealProduct);
52
48
 
53
- _BasicDealProduct["default"].initialize(this);
54
-
55
- _NewDealProductAllOf["default"].initialize(this, productId);
49
+ _BasicDealProduct["default"].initialize(this, itemPrice, quantity);
56
50
 
57
- NewDealProduct.initialize(this, itemPrice, quantity, productId);
51
+ NewDealProduct.initialize(this, itemPrice, quantity);
58
52
  }
59
53
  /**
60
54
  * Initializes the fields of this object.
@@ -65,10 +59,9 @@ var NewDealProduct = /*#__PURE__*/function () {
65
59
 
66
60
  (0, _createClass2["default"])(NewDealProduct, null, [{
67
61
  key: "initialize",
68
- value: function initialize(obj, itemPrice, quantity, productId) {
62
+ value: function initialize(obj, itemPrice, quantity) {
69
63
  obj['item_price'] = itemPrice;
70
64
  obj['quantity'] = quantity;
71
- obj['product_id'] = productId;
72
65
  }
73
66
  /**
74
67
  * Constructs a <code>NewDealProduct</code> from a plain JavaScript object, optionally creating a new instance.
@@ -86,8 +79,6 @@ var NewDealProduct = /*#__PURE__*/function () {
86
79
 
87
80
  _BasicDealProduct["default"].constructFromObject(data, obj);
88
81
 
89
- _NewDealProductAllOf["default"].constructFromObject(data, obj);
90
-
91
82
  if (data.hasOwnProperty('item_price')) {
92
83
  obj['item_price'] = _ApiClient["default"].convertToType(data['item_price'], 'Number');
93
84
  delete data['item_price'];
@@ -128,11 +119,6 @@ var NewDealProduct = /*#__PURE__*/function () {
128
119
  delete data['enabled_flag'];
129
120
  }
130
121
 
131
- if (data.hasOwnProperty('product_id')) {
132
- obj['product_id'] = _ApiClient["default"].convertToType(data['product_id'], 'Number');
133
- delete data['product_id'];
134
- }
135
-
136
122
  if (Object.keys(data).length > 0) {
137
123
  Object.assign(obj, data);
138
124
  }
@@ -194,13 +180,7 @@ NewDealProduct.prototype['tax'] = 0;
194
180
  * @member {module:model/NumberBoolean} enabled_flag
195
181
  */
196
182
 
197
- NewDealProduct.prototype['enabled_flag'] = undefined;
198
- /**
199
- * The ID of the product that will be attached
200
- * @member {Number} product_id
201
- */
202
-
203
- NewDealProduct.prototype['product_id'] = undefined; // Implement BasicDealProduct interface:
183
+ NewDealProduct.prototype['enabled_flag'] = undefined; // Implement BasicDealProduct interface:
204
184
 
205
185
  /**
206
186
  * The price at which this product will be added to the deal
@@ -252,13 +232,6 @@ _BasicDealProduct["default"].prototype['tax'] = 0;
252
232
  * @member {module:model/NumberBoolean} enabled_flag
253
233
  */
254
234
 
255
- _BasicDealProduct["default"].prototype['enabled_flag'] = undefined; // Implement NewDealProductAllOf interface:
256
-
257
- /**
258
- * The ID of the product that will be attached
259
- * @member {Number} product_id
260
- */
261
-
262
- _NewDealProductAllOf["default"].prototype['product_id'] = undefined;
235
+ _BasicDealProduct["default"].prototype['enabled_flag'] = undefined;
263
236
  var _default = NewDealProduct;
264
237
  exports["default"] = _default;
@@ -48,7 +48,7 @@ var NewOrganization = /*#__PURE__*/function () {
48
48
  function NewOrganization(name) {
49
49
  (0, _classCallCheck2["default"])(this, NewOrganization);
50
50
 
51
- _BasicOrganization["default"].initialize(this);
51
+ _BasicOrganization["default"].initialize(this, name);
52
52
 
53
53
  _NewOrganizationAllOf["default"].initialize(this);
54
54
 
@@ -54,7 +54,7 @@ var NewPerson = /*#__PURE__*/function () {
54
54
  function NewPerson(name) {
55
55
  (0, _classCallCheck2["default"])(this, NewPerson);
56
56
 
57
- _BasicPerson["default"].initialize(this);
57
+ _BasicPerson["default"].initialize(this, name);
58
58
 
59
59
  _NewPersonAllOf["default"].initialize(this);
60
60
 
@@ -50,7 +50,7 @@ var Note = /*#__PURE__*/function () {
50
50
 
51
51
  _NoteConnectToParams["default"].initialize(this);
52
52
 
53
- _NoteParams["default"].initialize(this);
53
+ _NoteParams["default"].initialize(this, content);
54
54
 
55
55
  Note.initialize(this, content);
56
56
  }
@@ -37,10 +37,11 @@ var NoteParams = /*#__PURE__*/function () {
37
37
  /**
38
38
  * Constructs a new <code>NoteParams</code>.
39
39
  * @alias module:model/NoteParams
40
+ * @param content {String} The content of the note in HTML format. Subject to sanitization on the back-end.
40
41
  */
41
- function NoteParams() {
42
+ function NoteParams(content) {
42
43
  (0, _classCallCheck2["default"])(this, NoteParams);
43
- NoteParams.initialize(this);
44
+ NoteParams.initialize(this, content);
44
45
  }
45
46
  /**
46
47
  * Initializes the fields of this object.
@@ -51,7 +52,9 @@ var NoteParams = /*#__PURE__*/function () {
51
52
 
52
53
  (0, _createClass2["default"])(NoteParams, null, [{
53
54
  key: "initialize",
54
- value: function initialize(obj) {}
55
+ value: function initialize(obj, content) {
56
+ obj['content'] = content;
57
+ }
55
58
  /**
56
59
  * Constructs a <code>NoteParams</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.
@@ -0,0 +1,90 @@
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
+ /**
17
+ * Pipedrive API v1
18
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
19
+ *
20
+ * The version of the OpenAPI document: 1.0.0
21
+ *
22
+ *
23
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
24
+ * https://openapi-generator.tech
25
+ * Do not edit the class manually.
26
+ *
27
+ */
28
+
29
+ /**
30
+ * The OptionalNameObject model module.
31
+ * @module model/OptionalNameObject
32
+ * @version 1.0.0
33
+ */
34
+ var OptionalNameObject = /*#__PURE__*/function () {
35
+ /**
36
+ * Constructs a new <code>OptionalNameObject</code>.
37
+ * @alias module:model/OptionalNameObject
38
+ */
39
+ function OptionalNameObject() {
40
+ (0, _classCallCheck2["default"])(this, OptionalNameObject);
41
+ OptionalNameObject.initialize(this);
42
+ }
43
+ /**
44
+ * Initializes the fields of this object.
45
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
46
+ * Only for internal use.
47
+ */
48
+
49
+
50
+ (0, _createClass2["default"])(OptionalNameObject, null, [{
51
+ key: "initialize",
52
+ value: function initialize(obj) {}
53
+ /**
54
+ * Constructs a <code>OptionalNameObject</code> from a plain JavaScript object, optionally creating a new instance.
55
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
56
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
57
+ * @param {module:model/OptionalNameObject} obj Optional instance to populate.
58
+ * @return {module:model/OptionalNameObject} The populated <code>OptionalNameObject</code> instance.
59
+ */
60
+
61
+ }, {
62
+ key: "constructFromObject",
63
+ value: function constructFromObject(data, obj) {
64
+ if (data) {
65
+ obj = obj || new OptionalNameObject();
66
+
67
+ if (data.hasOwnProperty('name')) {
68
+ obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
69
+ delete data['name'];
70
+ }
71
+
72
+ if (Object.keys(data).length > 0) {
73
+ Object.assign(obj, data);
74
+ }
75
+ }
76
+
77
+ return obj;
78
+ }
79
+ }]);
80
+ return OptionalNameObject;
81
+ }();
82
+ /**
83
+ * The name of the product
84
+ * @member {String} name
85
+ */
86
+
87
+
88
+ OptionalNameObject.prototype['name'] = undefined;
89
+ var _default = OptionalNameObject;
90
+ exports["default"] = _default;
@@ -43,15 +43,18 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
43
43
  * @alias module:model/ProductAttachmentDetails
44
44
  * @implements module:model/BasicDealProduct
45
45
  * @implements module:model/ProductAttachementFields
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 ProductAttachmentDetails() {
50
+ function ProductAttachmentDetails(itemPrice, quantity, productId) {
48
51
  (0, _classCallCheck2["default"])(this, ProductAttachmentDetails);
49
52
 
50
- _BasicDealProduct["default"].initialize(this);
53
+ _BasicDealProduct["default"].initialize(this, itemPrice, quantity);
51
54
 
52
55
  _ProductAttachementFields["default"].initialize(this);
53
56
 
54
- ProductAttachmentDetails.initialize(this);
57
+ ProductAttachmentDetails.initialize(this, itemPrice, quantity, productId);
55
58
  }
56
59
  /**
57
60
  * Initializes the fields of this object.
@@ -62,7 +65,11 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
62
65
 
63
66
  (0, _createClass2["default"])(ProductAttachmentDetails, 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>ProductAttachmentDetails</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.
@@ -68,11 +68,6 @@ var ProductRequest = /*#__PURE__*/function () {
68
68
  if (data) {
69
69
  obj = obj || new ProductRequest();
70
70
 
71
- if (data.hasOwnProperty('name')) {
72
- obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
73
- delete data['name'];
74
- }
75
-
76
71
  if (data.hasOwnProperty('code')) {
77
72
  obj['code'] = _ApiClient["default"].convertToType(data['code'], 'String');
78
73
  delete data['code'];
@@ -123,18 +118,12 @@ var ProductRequest = /*#__PURE__*/function () {
123
118
  }]);
124
119
  return ProductRequest;
125
120
  }();
126
- /**
127
- * The name of the product
128
- * @member {String} name
129
- */
130
-
131
-
132
- ProductRequest.prototype['name'] = undefined;
133
121
  /**
134
122
  * The product code
135
123
  * @member {String} code
136
124
  */
137
125
 
126
+
138
127
  ProductRequest.prototype['code'] = undefined;
139
128
  /**
140
129
  * The unit in which this product is sold