pipedrive 18.1.4 → 19.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. package/README.md +21 -1
  2. package/dist/api/ActivitiesApi.js +76 -5
  3. package/dist/api/DealsApi.js +91 -25
  4. package/dist/api/LeadsApi.js +56 -0
  5. package/dist/api/ProductsApi.js +6 -6
  6. package/dist/api/RolesApi.js +125 -0
  7. package/dist/api/StagesApi.js +7 -1
  8. package/dist/index.js +108 -3
  9. package/dist/model/ActivityCollectionResponseObject.js +637 -0
  10. package/dist/model/ActivityCollectionResponseObjectAllOf.js +346 -0
  11. package/dist/model/ActivityObjectFragment.js +11 -11
  12. package/dist/model/ActivityPostObject.js +32 -17
  13. package/dist/model/ActivityPostObjectAllOf.js +10 -0
  14. package/dist/model/ActivityPutObject.js +32 -17
  15. package/dist/model/ActivityPutObjectAllOf.js +10 -0
  16. package/dist/model/ActivityResponseObject.js +55 -45
  17. package/dist/model/ActivityResponseObjectAllOf.js +22 -22
  18. package/dist/model/AddProductAttachmentDetails.js +29 -28
  19. package/dist/model/AddProductRequestBody.js +18 -11
  20. package/dist/model/AddWebhookRequest.js +29 -0
  21. package/dist/model/AdditionalDataWithCursorPagination.js +79 -0
  22. package/dist/model/AdditionalDataWithOffsetPagination.js +79 -0
  23. package/dist/model/BaseDeal.js +1 -1
  24. package/dist/model/BaseProduct.js +10 -7
  25. package/dist/model/BasicDealProduct.js +19 -8
  26. package/dist/model/DealCollectionResponseObject.js +278 -0
  27. package/dist/model/DealNonStrict.js +2 -2
  28. package/dist/model/DealNonStrictWithDetails.js +2 -2
  29. package/dist/model/DealProductUnitDuration.js +61 -0
  30. package/dist/model/DealStrict.js +2 -2
  31. package/dist/model/DealStrictWithMergeId.js +2 -2
  32. package/dist/model/DeleteDealProductData.js +0 -10
  33. package/dist/model/GetActivitiesCollectionResponse200.js +97 -0
  34. package/dist/model/GetComments.js +3 -3
  35. package/dist/model/GetDealsCollection.js +98 -0
  36. package/dist/model/GetNotes.js +3 -3
  37. package/dist/model/GetRolePipelines.js +108 -0
  38. package/dist/model/GetRolePipelinesAllOf.js +78 -0
  39. package/dist/model/GetRolePipelinesAllOfData.js +89 -0
  40. package/dist/model/ListProductFilesResponse.js +124 -0
  41. package/dist/model/ListProductFilesResponseAllOf.js +89 -0
  42. package/dist/model/NewDealProduct.js +30 -13
  43. package/dist/model/PersonListProduct.js +10 -7
  44. package/dist/model/ProductAttachmentDetails.js +29 -23
  45. package/dist/model/ProductBaseDeal.js +1 -1
  46. package/dist/model/ProductFileItem.js +219 -0
  47. package/dist/model/ProductRequest.js +10 -7
  48. package/dist/model/ProductWithArrayPrices.js +18 -11
  49. package/dist/model/ProductWithObjectPrices.js +18 -11
  50. package/dist/model/PutRolePipelinesBody.js +81 -0
  51. package/dist/model/UpdateDealProduct.js +176 -0
  52. package/dist/model/UpdateProductRequestBody.js +18 -11
  53. package/package.json +1 -1
@@ -0,0 +1,124 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
11
+ var _AdditionalData = _interopRequireDefault(require("./AdditionalData"));
12
+ var _BaseResponse = _interopRequireDefault(require("./BaseResponse"));
13
+ var _ListProductFilesResponseAllOf = _interopRequireDefault(require("./ListProductFilesResponseAllOf"));
14
+ var _ProductFileItem = _interopRequireDefault(require("./ProductFileItem"));
15
+ /**
16
+ * Pipedrive API v1
17
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
18
+ *
19
+ * The version of the OpenAPI document: 1.0.0
20
+ *
21
+ *
22
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
23
+ * https://openapi-generator.tech
24
+ * Do not edit the class manually.
25
+ *
26
+ */
27
+ /**
28
+ * The ListProductFilesResponse model module.
29
+ * @module model/ListProductFilesResponse
30
+ * @version 1.0.0
31
+ */
32
+ var ListProductFilesResponse = /*#__PURE__*/function () {
33
+ /**
34
+ * Constructs a new <code>ListProductFilesResponse</code>.
35
+ * @alias module:model/ListProductFilesResponse
36
+ * @implements module:model/BaseResponse
37
+ * @implements module:model/ListProductFilesResponseAllOf
38
+ */
39
+ function ListProductFilesResponse() {
40
+ (0, _classCallCheck2["default"])(this, ListProductFilesResponse);
41
+ _BaseResponse["default"].initialize(this);
42
+ _ListProductFilesResponseAllOf["default"].initialize(this);
43
+ ListProductFilesResponse.initialize(this);
44
+ }
45
+
46
+ /**
47
+ * Initializes the fields of this object.
48
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
49
+ * Only for internal use.
50
+ */
51
+ (0, _createClass2["default"])(ListProductFilesResponse, null, [{
52
+ key: "initialize",
53
+ value: function initialize(obj) {}
54
+
55
+ /**
56
+ * Constructs a <code>ListProductFilesResponse</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/ListProductFilesResponse} obj Optional instance to populate.
60
+ * @return {module:model/ListProductFilesResponse} The populated <code>ListProductFilesResponse</code> instance.
61
+ */
62
+ }, {
63
+ key: "constructFromObject",
64
+ value: function constructFromObject(data, obj) {
65
+ if (data) {
66
+ obj = obj || new ListProductFilesResponse();
67
+ _BaseResponse["default"].constructFromObject(data, obj);
68
+ _ListProductFilesResponseAllOf["default"].constructFromObject(data, obj);
69
+ if (data.hasOwnProperty('success')) {
70
+ obj['success'] = _ApiClient["default"].convertToType(data['success'], 'Boolean');
71
+ delete data['success'];
72
+ }
73
+ if (data.hasOwnProperty('data')) {
74
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_ProductFileItem["default"]]);
75
+ delete data['data'];
76
+ }
77
+ if (data.hasOwnProperty('additional_data')) {
78
+ obj['additional_data'] = _AdditionalData["default"].constructFromObject(data['additional_data']);
79
+ delete data['additional_data'];
80
+ }
81
+ if (Object.keys(data).length > 0) {
82
+ Object.assign(obj, data);
83
+ }
84
+ }
85
+ return obj;
86
+ }
87
+ }]);
88
+ return ListProductFilesResponse;
89
+ }();
90
+ /**
91
+ * If the response is successful or not
92
+ * @member {Boolean} success
93
+ */
94
+ ListProductFilesResponse.prototype['success'] = undefined;
95
+
96
+ /**
97
+ * The array of files
98
+ * @member {Array.<module:model/ProductFileItem>} data
99
+ */
100
+ ListProductFilesResponse.prototype['data'] = undefined;
101
+
102
+ /**
103
+ * @member {module:model/AdditionalData} additional_data
104
+ */
105
+ ListProductFilesResponse.prototype['additional_data'] = undefined;
106
+
107
+ // Implement BaseResponse interface:
108
+ /**
109
+ * If the response is successful or not
110
+ * @member {Boolean} success
111
+ */
112
+ _BaseResponse["default"].prototype['success'] = undefined;
113
+ // Implement ListProductFilesResponseAllOf interface:
114
+ /**
115
+ * The array of files
116
+ * @member {Array.<module:model/ProductFileItem>} data
117
+ */
118
+ _ListProductFilesResponseAllOf["default"].prototype['data'] = undefined;
119
+ /**
120
+ * @member {module:model/AdditionalData} additional_data
121
+ */
122
+ _ListProductFilesResponseAllOf["default"].prototype['additional_data'] = undefined;
123
+ var _default = ListProductFilesResponse;
124
+ exports["default"] = _default;
@@ -0,0 +1,89 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports["default"] = void 0;
8
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
+ var _ApiClient = _interopRequireDefault(require("../ApiClient"));
11
+ var _AdditionalData = _interopRequireDefault(require("./AdditionalData"));
12
+ var _ProductFileItem = _interopRequireDefault(require("./ProductFileItem"));
13
+ /**
14
+ * Pipedrive API v1
15
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
16
+ *
17
+ * The version of the OpenAPI document: 1.0.0
18
+ *
19
+ *
20
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
+ * https://openapi-generator.tech
22
+ * Do not edit the class manually.
23
+ *
24
+ */
25
+ /**
26
+ * The ListProductFilesResponseAllOf model module.
27
+ * @module model/ListProductFilesResponseAllOf
28
+ * @version 1.0.0
29
+ */
30
+ var ListProductFilesResponseAllOf = /*#__PURE__*/function () {
31
+ /**
32
+ * Constructs a new <code>ListProductFilesResponseAllOf</code>.
33
+ * @alias module:model/ListProductFilesResponseAllOf
34
+ */
35
+ function ListProductFilesResponseAllOf() {
36
+ (0, _classCallCheck2["default"])(this, ListProductFilesResponseAllOf);
37
+ ListProductFilesResponseAllOf.initialize(this);
38
+ }
39
+
40
+ /**
41
+ * Initializes the fields of this object.
42
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
43
+ * Only for internal use.
44
+ */
45
+ (0, _createClass2["default"])(ListProductFilesResponseAllOf, null, [{
46
+ key: "initialize",
47
+ value: function initialize(obj) {}
48
+
49
+ /**
50
+ * Constructs a <code>ListProductFilesResponseAllOf</code> from a plain JavaScript object, optionally creating a new instance.
51
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
52
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
53
+ * @param {module:model/ListProductFilesResponseAllOf} obj Optional instance to populate.
54
+ * @return {module:model/ListProductFilesResponseAllOf} The populated <code>ListProductFilesResponseAllOf</code> instance.
55
+ */
56
+ }, {
57
+ key: "constructFromObject",
58
+ value: function constructFromObject(data, obj) {
59
+ if (data) {
60
+ obj = obj || new ListProductFilesResponseAllOf();
61
+ if (data.hasOwnProperty('data')) {
62
+ obj['data'] = _ApiClient["default"].convertToType(data['data'], [_ProductFileItem["default"]]);
63
+ delete data['data'];
64
+ }
65
+ if (data.hasOwnProperty('additional_data')) {
66
+ obj['additional_data'] = _AdditionalData["default"].constructFromObject(data['additional_data']);
67
+ delete data['additional_data'];
68
+ }
69
+ if (Object.keys(data).length > 0) {
70
+ Object.assign(obj, data);
71
+ }
72
+ }
73
+ return obj;
74
+ }
75
+ }]);
76
+ return ListProductFilesResponseAllOf;
77
+ }();
78
+ /**
79
+ * The array of files
80
+ * @member {Array.<module:model/ProductFileItem>} data
81
+ */
82
+ ListProductFilesResponseAllOf.prototype['data'] = undefined;
83
+
84
+ /**
85
+ * @member {module:model/AdditionalData} additional_data
86
+ */
87
+ ListProductFilesResponseAllOf.prototype['additional_data'] = undefined;
88
+ var _default = ListProductFilesResponseAllOf;
89
+ exports["default"] = _default;
@@ -9,13 +9,13 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
11
11
  var _BasicDealProduct = _interopRequireDefault(require("./BasicDealProduct"));
12
- var _NumberBoolean = _interopRequireDefault(require("./NumberBoolean"));
12
+ var _DealProductUnitDuration = _interopRequireDefault(require("./DealProductUnitDuration"));
13
13
  /**
14
14
  * Pipedrive API v1
15
15
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
16
16
  *
17
17
  * The version of the OpenAPI document: 1.0.0
18
- *
18
+ *
19
19
  *
20
20
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
21
21
  * https://openapi-generator.tech
@@ -88,6 +88,10 @@ var NewDealProduct = /*#__PURE__*/function () {
88
88
  obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number');
89
89
  delete data['duration'];
90
90
  }
91
+ if (data.hasOwnProperty('duration_unit')) {
92
+ obj['duration_unit'] = _ApiClient["default"].convertToType(data['duration_unit'], _DealProductUnitDuration["default"]);
93
+ delete data['duration_unit'];
94
+ }
91
95
  if (data.hasOwnProperty('product_variation_id')) {
92
96
  obj['product_variation_id'] = _ApiClient["default"].convertToType(data['product_variation_id'], 'Number');
93
97
  delete data['product_variation_id'];
@@ -101,7 +105,7 @@ var NewDealProduct = /*#__PURE__*/function () {
101
105
  delete data['tax'];
102
106
  }
103
107
  if (data.hasOwnProperty('enabled_flag')) {
104
- obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], _NumberBoolean["default"]);
108
+ obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
105
109
  delete data['enabled_flag'];
106
110
  }
107
111
  if (Object.keys(data).length > 0) {
@@ -139,12 +143,18 @@ NewDealProduct.prototype['quantity'] = undefined;
139
143
  NewDealProduct.prototype['discount_percentage'] = 0;
140
144
 
141
145
  /**
142
- * The duration of the product (when product durations are not enabled for the company or if omitted, defaults to 1)
146
+ * The duration of the product. If omitted, will be set to 1.
143
147
  * @member {Number} duration
144
148
  * @default 1
145
149
  */
146
150
  NewDealProduct.prototype['duration'] = 1;
147
151
 
152
+ /**
153
+ * The unit duration of the product
154
+ * @member {module:model/DealProductUnitDuration} duration_unit
155
+ */
156
+ NewDealProduct.prototype['duration_unit'] = undefined;
157
+
148
158
  /**
149
159
  * The ID of the product variation to use. When omitted, no variation will be used.
150
160
  * @member {Number} product_variation_id
@@ -152,7 +162,7 @@ NewDealProduct.prototype['duration'] = 1;
152
162
  NewDealProduct.prototype['product_variation_id'] = undefined;
153
163
 
154
164
  /**
155
- * Any textual comment associated with this product-deal attachment. Visible and editable in the application UI.
165
+ * A textual comment associated with this product-deal attachment
156
166
  * @member {String} comments
157
167
  */
158
168
  NewDealProduct.prototype['comments'] = undefined;
@@ -165,10 +175,11 @@ NewDealProduct.prototype['comments'] = undefined;
165
175
  NewDealProduct.prototype['tax'] = 0;
166
176
 
167
177
  /**
168
- * Whether the product is enabled on the deal or not. This makes it possible to add products to a deal with a specific price and discount criteria - but keep them disabled, which refrains them from being included in the deal price calculation. When omitted, the product will be marked as enabled by default.
169
- * @member {module:model/NumberBoolean} enabled_flag
178
+ * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default.
179
+ * @member {Boolean} enabled_flag
180
+ * @default true
170
181
  */
171
- NewDealProduct.prototype['enabled_flag'] = undefined;
182
+ NewDealProduct.prototype['enabled_flag'] = true;
172
183
 
173
184
  // Implement BasicDealProduct interface:
174
185
  /**
@@ -193,18 +204,23 @@ _BasicDealProduct["default"].prototype['quantity'] = undefined;
193
204
  */
194
205
  _BasicDealProduct["default"].prototype['discount_percentage'] = 0;
195
206
  /**
196
- * The duration of the product (when product durations are not enabled for the company or if omitted, defaults to 1)
207
+ * The duration of the product. If omitted, will be set to 1.
197
208
  * @member {Number} duration
198
209
  * @default 1
199
210
  */
200
211
  _BasicDealProduct["default"].prototype['duration'] = 1;
212
+ /**
213
+ * The unit duration of the product
214
+ * @member {module:model/DealProductUnitDuration} duration_unit
215
+ */
216
+ _BasicDealProduct["default"].prototype['duration_unit'] = undefined;
201
217
  /**
202
218
  * The ID of the product variation to use. When omitted, no variation will be used.
203
219
  * @member {Number} product_variation_id
204
220
  */
205
221
  _BasicDealProduct["default"].prototype['product_variation_id'] = undefined;
206
222
  /**
207
- * Any textual comment associated with this product-deal attachment. Visible and editable in the application UI.
223
+ * A textual comment associated with this product-deal attachment
208
224
  * @member {String} comments
209
225
  */
210
226
  _BasicDealProduct["default"].prototype['comments'] = undefined;
@@ -215,9 +231,10 @@ _BasicDealProduct["default"].prototype['comments'] = undefined;
215
231
  */
216
232
  _BasicDealProduct["default"].prototype['tax'] = 0;
217
233
  /**
218
- * Whether the product is enabled on the deal or not. This makes it possible to add products to a deal with a specific price and discount criteria - but keep them disabled, which refrains them from being included in the deal price calculation. When omitted, the product will be marked as enabled by default.
219
- * @member {module:model/NumberBoolean} enabled_flag
234
+ * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default.
235
+ * @member {Boolean} enabled_flag
236
+ * @default true
220
237
  */
221
- _BasicDealProduct["default"].prototype['enabled_flag'] = undefined;
238
+ _BasicDealProduct["default"].prototype['enabled_flag'] = true;
222
239
  var _default = NewDealProduct;
223
240
  exports["default"] = _default;
@@ -8,7 +8,6 @@ exports["default"] = void 0;
8
8
  var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
11
- var _NumberBooleanDefault = _interopRequireDefault(require("./NumberBooleanDefault1"));
12
11
  var _VisibleTo = _interopRequireDefault(require("./VisibleTo"));
13
12
  /**
14
13
  * Pipedrive API v1
@@ -91,11 +90,11 @@ var PersonListProduct = /*#__PURE__*/function () {
91
90
  delete data['category'];
92
91
  }
93
92
  if (data.hasOwnProperty('active_flag')) {
94
- obj['active_flag'] = _NumberBooleanDefault["default"].constructFromObject(data['active_flag']);
93
+ obj['active_flag'] = _ApiClient["default"].convertToType(data['active_flag'], 'Boolean');
95
94
  delete data['active_flag'];
96
95
  }
97
96
  if (data.hasOwnProperty('selectable')) {
98
- obj['selectable'] = _NumberBooleanDefault["default"].constructFromObject(data['selectable']);
97
+ obj['selectable'] = _ApiClient["default"].convertToType(data['selectable'], 'Boolean');
99
98
  delete data['selectable'];
100
99
  }
101
100
  if (data.hasOwnProperty('first_char')) {
@@ -185,14 +184,18 @@ PersonListProduct.prototype['tax'] = 0;
185
184
  PersonListProduct.prototype['category'] = undefined;
186
185
 
187
186
  /**
188
- * @member {module:model/NumberBooleanDefault1} active_flag
187
+ * Whether this product will be made active or not
188
+ * @member {Boolean} active_flag
189
+ * @default true
189
190
  */
190
- PersonListProduct.prototype['active_flag'] = undefined;
191
+ PersonListProduct.prototype['active_flag'] = true;
191
192
 
192
193
  /**
193
- * @member {module:model/NumberBooleanDefault1} selectable
194
+ * Whether this product can be selected in deals or not
195
+ * @member {Boolean} selectable
196
+ * @default true
194
197
  */
195
- PersonListProduct.prototype['selectable'] = undefined;
198
+ PersonListProduct.prototype['selectable'] = true;
196
199
 
197
200
  /**
198
201
  * The first letter of the product name
@@ -9,14 +9,13 @@ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/cl
9
9
  var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
10
  var _ApiClient = _interopRequireDefault(require("../ApiClient"));
11
11
  var _BasicDealProduct = _interopRequireDefault(require("./BasicDealProduct"));
12
- var _NumberBoolean = _interopRequireDefault(require("./NumberBoolean"));
13
12
  var _ProductAttachementFields = _interopRequireDefault(require("./ProductAttachementFields"));
14
13
  /**
15
14
  * Pipedrive API v1
16
15
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
17
16
  *
18
17
  * The version of the OpenAPI document: 1.0.0
19
- *
18
+ *
20
19
  *
21
20
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
22
21
  * https://openapi-generator.tech
@@ -92,6 +91,10 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
92
91
  obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number');
93
92
  delete data['duration'];
94
93
  }
94
+ if (data.hasOwnProperty('duration_unit')) {
95
+ obj['duration_unit'] = _ApiClient["default"].convertToType(data['duration_unit'], 'String');
96
+ delete data['duration_unit'];
97
+ }
95
98
  if (data.hasOwnProperty('product_variation_id')) {
96
99
  obj['product_variation_id'] = _ApiClient["default"].convertToType(data['product_variation_id'], 'Number');
97
100
  delete data['product_variation_id'];
@@ -105,7 +108,7 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
105
108
  delete data['tax'];
106
109
  }
107
110
  if (data.hasOwnProperty('enabled_flag')) {
108
- obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], _NumberBoolean["default"]);
111
+ obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
109
112
  delete data['enabled_flag'];
110
113
  }
111
114
  if (data.hasOwnProperty('id')) {
@@ -120,10 +123,6 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
120
123
  obj['deal_id'] = _ApiClient["default"].convertToType(data['deal_id'], 'Number');
121
124
  delete data['deal_id'];
122
125
  }
123
- if (data.hasOwnProperty('duration_unit')) {
124
- obj['duration_unit'] = _ApiClient["default"].convertToType(data['duration_unit'], 'String');
125
- delete data['duration_unit'];
126
- }
127
126
  if (data.hasOwnProperty('sum_no_discount')) {
128
127
  obj['sum_no_discount'] = _ApiClient["default"].convertToType(data['sum_no_discount'], 'Number');
129
128
  delete data['sum_no_discount'];
@@ -187,12 +186,18 @@ ProductAttachmentDetails.prototype['quantity'] = undefined;
187
186
  ProductAttachmentDetails.prototype['discount_percentage'] = 0;
188
187
 
189
188
  /**
190
- * The duration of the product (when product durations are not enabled for the company or if omitted, defaults to 1)
189
+ * The duration of the product. If omitted, will be set to 1.
191
190
  * @member {Number} duration
192
191
  * @default 1
193
192
  */
194
193
  ProductAttachmentDetails.prototype['duration'] = 1;
195
194
 
195
+ /**
196
+ * The type of the duration. (For example hourly, daily, etc.)
197
+ * @member {String} duration_unit
198
+ */
199
+ ProductAttachmentDetails.prototype['duration_unit'] = undefined;
200
+
196
201
  /**
197
202
  * The ID of the product variation to use. When omitted, no variation will be used.
198
203
  * @member {Number} product_variation_id
@@ -200,7 +205,7 @@ ProductAttachmentDetails.prototype['duration'] = 1;
200
205
  ProductAttachmentDetails.prototype['product_variation_id'] = undefined;
201
206
 
202
207
  /**
203
- * Any textual comment associated with this product-deal attachment. Visible and editable in the application UI.
208
+ * A textual comment associated with this product-deal attachment
204
209
  * @member {String} comments
205
210
  */
206
211
  ProductAttachmentDetails.prototype['comments'] = undefined;
@@ -212,10 +217,11 @@ ProductAttachmentDetails.prototype['comments'] = undefined;
212
217
  ProductAttachmentDetails.prototype['tax'] = undefined;
213
218
 
214
219
  /**
215
- * Whether the product is enabled on the deal or not. This makes it possible to add products to a deal with a specific price and discount criteria - but keep them disabled, which refrains them from being included in the deal price calculation. When omitted, the product will be marked as enabled by default.
216
- * @member {module:model/NumberBoolean} enabled_flag
220
+ * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default.
221
+ * @member {Boolean} enabled_flag
222
+ * @default true
217
223
  */
218
- ProductAttachmentDetails.prototype['enabled_flag'] = undefined;
224
+ ProductAttachmentDetails.prototype['enabled_flag'] = true;
219
225
 
220
226
  /**
221
227
  * The ID of the deal-product (the ID of the product attached to the deal)
@@ -235,12 +241,6 @@ ProductAttachmentDetails.prototype['company_id'] = undefined;
235
241
  */
236
242
  ProductAttachmentDetails.prototype['deal_id'] = undefined;
237
243
 
238
- /**
239
- * The type of the duration. (For example hourly, daily, etc.)
240
- * @member {String} duration_unit
241
- */
242
- ProductAttachmentDetails.prototype['duration_unit'] = undefined;
243
-
244
244
  /**
245
245
  * The product sum without the discount
246
246
  * @member {Number} sum_no_discount
@@ -306,18 +306,23 @@ _BasicDealProduct["default"].prototype['quantity'] = undefined;
306
306
  */
307
307
  _BasicDealProduct["default"].prototype['discount_percentage'] = 0;
308
308
  /**
309
- * The duration of the product (when product durations are not enabled for the company or if omitted, defaults to 1)
309
+ * The duration of the product. If omitted, will be set to 1.
310
310
  * @member {Number} duration
311
311
  * @default 1
312
312
  */
313
313
  _BasicDealProduct["default"].prototype['duration'] = 1;
314
+ /**
315
+ * The unit duration of the product
316
+ * @member {module:model/DealProductUnitDuration} duration_unit
317
+ */
318
+ _BasicDealProduct["default"].prototype['duration_unit'] = undefined;
314
319
  /**
315
320
  * The ID of the product variation to use. When omitted, no variation will be used.
316
321
  * @member {Number} product_variation_id
317
322
  */
318
323
  _BasicDealProduct["default"].prototype['product_variation_id'] = undefined;
319
324
  /**
320
- * Any textual comment associated with this product-deal attachment. Visible and editable in the application UI.
325
+ * A textual comment associated with this product-deal attachment
321
326
  * @member {String} comments
322
327
  */
323
328
  _BasicDealProduct["default"].prototype['comments'] = undefined;
@@ -328,10 +333,11 @@ _BasicDealProduct["default"].prototype['comments'] = undefined;
328
333
  */
329
334
  _BasicDealProduct["default"].prototype['tax'] = 0;
330
335
  /**
331
- * Whether the product is enabled on the deal or not. This makes it possible to add products to a deal with a specific price and discount criteria - but keep them disabled, which refrains them from being included in the deal price calculation. When omitted, the product will be marked as enabled by default.
332
- * @member {module:model/NumberBoolean} enabled_flag
336
+ * Whether the product is enabled for a deal or not. This makes it possible to add products to a deal with a specific price and discount criteria, but keep them disabled, which refrains them from being included in the deal value calculation. When omitted, the product will be marked as enabled by default.
337
+ * @member {Boolean} enabled_flag
338
+ * @default true
333
339
  */
334
- _BasicDealProduct["default"].prototype['enabled_flag'] = undefined;
340
+ _BasicDealProduct["default"].prototype['enabled_flag'] = true;
335
341
  // Implement ProductAttachementFields interface:
336
342
  /**
337
343
  * The ID of the deal-product (the ID of the product attached to the deal)
@@ -394,7 +394,7 @@ ProductBaseDeal.prototype['visible_to'] = undefined;
394
394
  ProductBaseDeal.prototype['close_time'] = undefined;
395
395
 
396
396
  /**
397
- * The ID of pipeline associated with the deal
397
+ * The ID of the pipeline associated with the deal
398
398
  * @member {Number} pipeline_id
399
399
  */
400
400
  ProductBaseDeal.prototype['pipeline_id'] = undefined;