pipedrive 22.6.1 → 22.8.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/README.md +9 -4
  2. package/dist/api/DealsApi.js +2 -2
  3. package/dist/api/LeadsApi.js +2 -2
  4. package/dist/index.js +63 -28
  5. package/dist/model/AddLeadRequest.js +30 -0
  6. package/dist/model/AddProductAttachmentDetails.js +60 -23
  7. package/dist/model/AddProductRequestBody.js +50 -14
  8. package/dist/model/AddProductRequestBodyAllOf.js +78 -0
  9. package/dist/model/BaseDeal.js +40 -0
  10. package/dist/model/BaseProduct.js +60 -1
  11. package/dist/model/BasicDealProduct.js +139 -16
  12. package/dist/model/BasicDealProductAllOf.js +235 -0
  13. package/dist/model/BillingFrequency.js +86 -0
  14. package/dist/model/BillingFrequency1.js +86 -0
  15. package/dist/model/DealNonStrict.js +60 -0
  16. package/dist/model/DealNonStrictWithDetails.js +60 -0
  17. package/dist/model/DealProductRequestBody.js +235 -0
  18. package/dist/model/DealStrict.js +60 -0
  19. package/dist/model/DealStrictWithMergeId.js +60 -0
  20. package/dist/model/LeadResponse.js +40 -0
  21. package/dist/model/NameObject.js +78 -0
  22. package/dist/model/NewDeal.js +45 -0
  23. package/dist/model/NewDealParameters.js +30 -0
  24. package/dist/model/NewDealProduct.js +95 -43
  25. package/dist/model/NewDealProductAllOf.js +9 -12
  26. package/dist/model/NewDealProductAllOf1.js +78 -0
  27. package/dist/model/NewDealProductAllOf2.js +78 -0
  28. package/dist/model/PersonListProduct.js +1 -1
  29. package/dist/model/ProductAttachmentDetails.js +60 -23
  30. package/dist/model/ProductListItem.js +6 -6
  31. package/dist/model/ProductRequest.js +1 -1
  32. package/dist/model/ProductWithArrayPrices.js +72 -2
  33. package/dist/model/UpdateDealParameters.js +20 -0
  34. package/dist/model/UpdateDealProduct.js +135 -5
  35. package/dist/model/UpdateDealRequest.js +30 -0
  36. package/dist/model/UpdateLeadRequest.js +20 -0
  37. package/dist/model/UpdateProductRequestBody.js +50 -14
  38. package/dist/model/UpdateProductResponse.js +3 -3
  39. package/package.json +1 -1
@@ -9,6 +9,7 @@ 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 _BillingFrequency = _interopRequireDefault(require("./BillingFrequency"));
12
13
  var _ProductAttachementFields = _interopRequireDefault(require("./ProductAttachementFields"));
13
14
  /**
14
15
  * Pipedrive API v1
@@ -33,15 +34,12 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
33
34
  * @alias module:model/ProductAttachmentDetails
34
35
  * @implements module:model/BasicDealProduct
35
36
  * @implements module:model/ProductAttachementFields
36
- * @param productId {Number} The ID of the product
37
- * @param itemPrice {Number} The price at which this product will be added to the deal
38
- * @param quantity {Number} Quantity – e.g. how many items of this product will be added to the deal
39
37
  */
40
- function ProductAttachmentDetails(productId, itemPrice, quantity) {
38
+ function ProductAttachmentDetails() {
41
39
  (0, _classCallCheck2["default"])(this, ProductAttachmentDetails);
42
- _BasicDealProduct["default"].initialize(this, productId, itemPrice, quantity);
40
+ _BasicDealProduct["default"].initialize(this);
43
41
  _ProductAttachementFields["default"].initialize(this);
44
- ProductAttachmentDetails.initialize(this, productId, itemPrice, quantity);
42
+ ProductAttachmentDetails.initialize(this);
45
43
  }
46
44
 
47
45
  /**
@@ -51,11 +49,7 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
51
49
  */
52
50
  (0, _createClass2["default"])(ProductAttachmentDetails, null, [{
53
51
  key: "initialize",
54
- value: function initialize(obj, productId, itemPrice, quantity) {
55
- obj['product_id'] = productId;
56
- obj['item_price'] = itemPrice;
57
- obj['quantity'] = quantity;
58
- }
52
+ value: function initialize(obj) {}
59
53
 
60
54
  /**
61
55
  * Constructs a <code>ProductAttachmentDetails</code> from a plain JavaScript object, optionally creating a new instance.
@@ -119,6 +113,18 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
119
113
  obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
120
114
  delete data['enabled_flag'];
121
115
  }
116
+ if (data.hasOwnProperty('billing_frequency')) {
117
+ obj['billing_frequency'] = _BillingFrequency["default"].constructFromObject(data['billing_frequency']);
118
+ delete data['billing_frequency'];
119
+ }
120
+ if (data.hasOwnProperty('billing_frequency_cycles')) {
121
+ obj['billing_frequency_cycles'] = _ApiClient["default"].convertToType(data['billing_frequency_cycles'], 'Number');
122
+ delete data['billing_frequency_cycles'];
123
+ }
124
+ if (data.hasOwnProperty('billing_start_date')) {
125
+ obj['billing_start_date'] = _ApiClient["default"].convertToType(data['billing_start_date'], 'String');
126
+ delete data['billing_start_date'];
127
+ }
122
128
  if (data.hasOwnProperty('id')) {
123
129
  obj['id'] = _ApiClient["default"].convertToType(data['id'], 'Number');
124
130
  delete data['id'];
@@ -183,21 +189,21 @@ ProductAttachmentDetails.prototype['item_price'] = undefined;
183
189
  ProductAttachmentDetails.prototype['quantity'] = undefined;
184
190
 
185
191
  /**
186
- * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
192
+ * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage
187
193
  * @member {Number} discount
188
194
  * @default 0
189
195
  */
190
196
  ProductAttachmentDetails.prototype['discount'] = 0;
191
197
 
192
198
  /**
193
- * The type of the discount's value.
199
+ * The type of the discount's value
194
200
  * @member {module:model/ProductAttachmentDetails.DiscountTypeEnum} discount_type
195
201
  * @default 'percentage'
196
202
  */
197
203
  ProductAttachmentDetails.prototype['discount_type'] = 'percentage';
198
204
 
199
205
  /**
200
- * The duration of the product. If omitted, will be set to 1.
206
+ * The duration of the product. If omitted, will be set to 1
201
207
  * @member {Number} duration
202
208
  * @default 1
203
209
  */
@@ -210,7 +216,7 @@ ProductAttachmentDetails.prototype['duration'] = 1;
210
216
  ProductAttachmentDetails.prototype['duration_unit'] = undefined;
211
217
 
212
218
  /**
213
- * The ID of the product variation to use. When omitted, no variation will be used.
219
+ * The ID of the product variation to use. When omitted, no variation will be used
214
220
  * @member {Number} product_variation_id
215
221
  */
216
222
  ProductAttachmentDetails.prototype['product_variation_id'] = undefined;
@@ -228,18 +234,35 @@ ProductAttachmentDetails.prototype['comments'] = undefined;
228
234
  ProductAttachmentDetails.prototype['tax'] = undefined;
229
235
 
230
236
  /**
231
- * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal.
237
+ * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal
232
238
  * @member {module:model/ProductAttachmentDetails.TaxMethodEnum} tax_method
233
239
  */
234
240
  ProductAttachmentDetails.prototype['tax_method'] = undefined;
235
241
 
236
242
  /**
237
- * 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.
243
+ * 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
238
244
  * @member {Boolean} enabled_flag
239
245
  * @default true
240
246
  */
241
247
  ProductAttachmentDetails.prototype['enabled_flag'] = true;
242
248
 
249
+ /**
250
+ * @member {module:model/BillingFrequency} billing_frequency
251
+ */
252
+ ProductAttachmentDetails.prototype['billing_frequency'] = undefined;
253
+
254
+ /**
255
+ * Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 312
256
+ * @member {Number} billing_frequency_cycles
257
+ */
258
+ ProductAttachmentDetails.prototype['billing_frequency_cycles'] = undefined;
259
+
260
+ /**
261
+ * Only available in Advanced and above plans The billing start date. Must be between 15 years in the past and 15 years in the future
262
+ * @member {String} billing_start_date
263
+ */
264
+ ProductAttachmentDetails.prototype['billing_start_date'] = undefined;
265
+
243
266
  /**
244
267
  * The ID of the deal-product (the ID of the product attached to the deal)
245
268
  * @member {Number} id
@@ -311,19 +334,19 @@ _BasicDealProduct["default"].prototype['item_price'] = undefined;
311
334
  */
312
335
  _BasicDealProduct["default"].prototype['quantity'] = undefined;
313
336
  /**
314
- * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
337
+ * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage
315
338
  * @member {Number} discount
316
339
  * @default 0
317
340
  */
318
341
  _BasicDealProduct["default"].prototype['discount'] = 0;
319
342
  /**
320
- * The type of the discount's value.
343
+ * The type of the discount's value
321
344
  * @member {module:model/BasicDealProduct.DiscountTypeEnum} discount_type
322
345
  * @default 'percentage'
323
346
  */
324
347
  _BasicDealProduct["default"].prototype['discount_type'] = 'percentage';
325
348
  /**
326
- * The duration of the product. If omitted, will be set to 1.
349
+ * The duration of the product. If omitted, will be set to 1
327
350
  * @member {Number} duration
328
351
  * @default 1
329
352
  */
@@ -334,7 +357,7 @@ _BasicDealProduct["default"].prototype['duration'] = 1;
334
357
  */
335
358
  _BasicDealProduct["default"].prototype['duration_unit'] = undefined;
336
359
  /**
337
- * The ID of the product variation to use. When omitted, no variation will be used.
360
+ * The ID of the product variation to use. When omitted, no variation will be used
338
361
  * @member {Number} product_variation_id
339
362
  */
340
363
  _BasicDealProduct["default"].prototype['product_variation_id'] = undefined;
@@ -350,16 +373,30 @@ _BasicDealProduct["default"].prototype['comments'] = undefined;
350
373
  */
351
374
  _BasicDealProduct["default"].prototype['tax'] = 0;
352
375
  /**
353
- * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal.
376
+ * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal
354
377
  * @member {module:model/BasicDealProduct.TaxMethodEnum} tax_method
355
378
  */
356
379
  _BasicDealProduct["default"].prototype['tax_method'] = undefined;
357
380
  /**
358
- * 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.
381
+ * 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
359
382
  * @member {Boolean} enabled_flag
360
383
  * @default true
361
384
  */
362
385
  _BasicDealProduct["default"].prototype['enabled_flag'] = true;
386
+ /**
387
+ * @member {module:model/BillingFrequency} billing_frequency
388
+ */
389
+ _BasicDealProduct["default"].prototype['billing_frequency'] = undefined;
390
+ /**
391
+ * Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 312
392
+ * @member {Number} billing_frequency_cycles
393
+ */
394
+ _BasicDealProduct["default"].prototype['billing_frequency_cycles'] = undefined;
395
+ /**
396
+ * Only available in Advanced and above plans The billing start date. Must be between 15 years in the past and 15 years in the future
397
+ * @member {String} billing_start_date
398
+ */
399
+ _BasicDealProduct["default"].prototype['billing_start_date'] = undefined;
363
400
  // Implement ProductAttachementFields interface:
364
401
  /**
365
402
  * The ID of the deal-product (the ID of the product attached to the deal)
@@ -8,7 +8,7 @@ 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 _ProductWithObjectPrices = _interopRequireDefault(require("./ProductWithObjectPrices"));
11
+ var _ProductWithArrayPrices = _interopRequireDefault(require("./ProductWithArrayPrices"));
12
12
  /**
13
13
  * Pipedrive API v1
14
14
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -150,7 +150,7 @@ var ProductListItem = /*#__PURE__*/function () {
150
150
  delete data['quantity'];
151
151
  }
152
152
  if (data.hasOwnProperty('product')) {
153
- obj['product'] = _ProductWithObjectPrices["default"].constructFromObject(data['product']);
153
+ obj['product'] = _ProductWithArrayPrices["default"].constructFromObject(data['product']);
154
154
  delete data['product'];
155
155
  }
156
156
  if (Object.keys(data).length > 0) {
@@ -199,14 +199,14 @@ ProductListItem.prototype['product_variation_id'] = undefined;
199
199
  ProductListItem.prototype['item_price'] = undefined;
200
200
 
201
201
  /**
202
- * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
202
+ * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage
203
203
  * @member {Number} discount
204
204
  * @default 0
205
205
  */
206
206
  ProductListItem.prototype['discount'] = 0;
207
207
 
208
208
  /**
209
- * The type of the discount's value.
209
+ * The type of the discount's value
210
210
  * @member {module:model/ProductListItem.DiscountTypeEnum} discount_type
211
211
  * @default 'percentage'
212
212
  */
@@ -273,7 +273,7 @@ ProductListItem.prototype['active_flag'] = undefined;
273
273
  ProductListItem.prototype['tax'] = undefined;
274
274
 
275
275
  /**
276
- * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal.
276
+ * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount. By default, the user setting value for tax options will be used. Changing this in one product affects the rest of the products attached to the deal
277
277
  * @member {module:model/ProductListItem.TaxMethodEnum} tax_method
278
278
  */
279
279
  ProductListItem.prototype['tax_method'] = undefined;
@@ -303,7 +303,7 @@ ProductListItem.prototype['quantity_formatted'] = undefined;
303
303
  ProductListItem.prototype['quantity'] = undefined;
304
304
 
305
305
  /**
306
- * @member {module:model/ProductWithObjectPrices} product
306
+ * @member {module:model/ProductWithArrayPrices} product
307
307
  */
308
308
  ProductListItem.prototype['product'] = undefined;
309
309
 
@@ -138,7 +138,7 @@ ProductRequest.prototype['selectable'] = true;
138
138
  ProductRequest.prototype['visible_to'] = undefined;
139
139
 
140
140
  /**
141
- * The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used.
141
+ * The ID of the user who will be marked as the owner of this product. When omitted, the authorized user ID will be used
142
142
  * @member {Number} owner_id
143
143
  */
144
144
  ProductRequest.prototype['owner_id'] = undefined;
@@ -101,6 +101,14 @@ var ProductWithArrayPrices = /*#__PURE__*/function () {
101
101
  obj['owner_id'] = _ApiClient["default"].convertToType(data['owner_id'], Object);
102
102
  delete data['owner_id'];
103
103
  }
104
+ if (data.hasOwnProperty('billing_frequency')) {
105
+ obj['billing_frequency'] = _ApiClient["default"].convertToType(data['billing_frequency'], 'String');
106
+ delete data['billing_frequency'];
107
+ }
108
+ if (data.hasOwnProperty('billing_frequency_cycles')) {
109
+ obj['billing_frequency_cycles'] = _ApiClient["default"].convertToType(data['billing_frequency_cycles'], 'Number');
110
+ delete data['billing_frequency_cycles'];
111
+ }
104
112
  if (data.hasOwnProperty('prices')) {
105
113
  obj['prices'] = _ApiClient["default"].convertToType(data['prices'], [Object]);
106
114
  delete data['prices'];
@@ -139,7 +147,7 @@ ProductWithArrayPrices.prototype['code'] = undefined;
139
147
  ProductWithArrayPrices.prototype['unit'] = undefined;
140
148
 
141
149
  /**
142
- * The ax percentage
150
+ * The tax percentage
143
151
  * @member {Number} tax
144
152
  * @default 0
145
153
  */
@@ -171,6 +179,19 @@ ProductWithArrayPrices.prototype['visible_to'] = undefined;
171
179
  */
172
180
  ProductWithArrayPrices.prototype['owner_id'] = undefined;
173
181
 
182
+ /**
183
+ * Only available in Advanced and above plans How often a customer is billed for access to a service or product
184
+ * @member {module:model/ProductWithArrayPrices.BillingFrequencyEnum} billing_frequency
185
+ * @default 'one-time'
186
+ */
187
+ ProductWithArrayPrices.prototype['billing_frequency'] = 'one-time';
188
+
189
+ /**
190
+ * Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field is always `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 312
191
+ * @member {Number} billing_frequency_cycles
192
+ */
193
+ ProductWithArrayPrices.prototype['billing_frequency_cycles'] = undefined;
194
+
174
195
  /**
175
196
  * Array of objects, each containing: currency (string), price (number), cost (number, optional), overhead_cost (number, optional)
176
197
  * @member {Array.<Object>} prices
@@ -199,7 +220,7 @@ _BaseProduct["default"].prototype['code'] = undefined;
199
220
  */
200
221
  _BaseProduct["default"].prototype['unit'] = undefined;
201
222
  /**
202
- * The ax percentage
223
+ * The tax percentage
203
224
  * @member {Number} tax
204
225
  * @default 0
205
226
  */
@@ -226,11 +247,60 @@ _BaseProduct["default"].prototype['visible_to'] = undefined;
226
247
  * @member {Object} owner_id
227
248
  */
228
249
  _BaseProduct["default"].prototype['owner_id'] = undefined;
250
+ /**
251
+ * Only available in Advanced and above plans How often a customer is billed for access to a service or product
252
+ * @member {module:model/BaseProduct.BillingFrequencyEnum} billing_frequency
253
+ * @default 'one-time'
254
+ */
255
+ _BaseProduct["default"].prototype['billing_frequency'] = 'one-time';
256
+ /**
257
+ * Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field is always `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 312
258
+ * @member {Number} billing_frequency_cycles
259
+ */
260
+ _BaseProduct["default"].prototype['billing_frequency_cycles'] = undefined;
229
261
  // Implement ArrayPrices interface:
230
262
  /**
231
263
  * Array of objects, each containing: currency (string), price (number), cost (number, optional), overhead_cost (number, optional)
232
264
  * @member {Array.<Object>} prices
233
265
  */
234
266
  _ArrayPrices["default"].prototype['prices'] = undefined;
267
+
268
+ /**
269
+ * Allowed values for the <code>billing_frequency</code> property.
270
+ * @enum {String}
271
+ * @readonly
272
+ */
273
+ ProductWithArrayPrices['BillingFrequencyEnum'] = {
274
+ /**
275
+ * value: "one-time"
276
+ * @const
277
+ */
278
+ "one-time": "one-time",
279
+ /**
280
+ * value: "annually"
281
+ * @const
282
+ */
283
+ "annually": "annually",
284
+ /**
285
+ * value: "semi-annually"
286
+ * @const
287
+ */
288
+ "semi-annually": "semi-annually",
289
+ /**
290
+ * value: "quarterly"
291
+ * @const
292
+ */
293
+ "quarterly": "quarterly",
294
+ /**
295
+ * value: "monthly"
296
+ * @const
297
+ */
298
+ "monthly": "monthly",
299
+ /**
300
+ * value: "weekly"
301
+ * @const
302
+ */
303
+ "weekly": "weekly"
304
+ };
235
305
  var _default = ProductWithArrayPrices;
236
306
  exports["default"] = _default;
@@ -92,6 +92,14 @@ var UpdateDealParameters = /*#__PURE__*/function () {
92
92
  obj['status'] = _ApiClient["default"].convertToType(data['status'], 'String');
93
93
  delete data['status'];
94
94
  }
95
+ if (data.hasOwnProperty('channel')) {
96
+ obj['channel'] = _ApiClient["default"].convertToType(data['channel'], 'Number');
97
+ delete data['channel'];
98
+ }
99
+ if (data.hasOwnProperty('channel_id')) {
100
+ obj['channel_id'] = _ApiClient["default"].convertToType(data['channel_id'], 'String');
101
+ delete data['channel_id'];
102
+ }
95
103
  if (Object.keys(data).length > 0) {
96
104
  Object.assign(obj, data);
97
105
  }
@@ -155,6 +163,18 @@ UpdateDealParameters.prototype['stage_id'] = undefined;
155
163
  */
156
164
  UpdateDealParameters.prototype['status'] = undefined;
157
165
 
166
+ /**
167
+ * The ID of Marketing channel this deal was created from. Provided value must be one of the channels configured for your company which you can fetch with <a href=\"https://developers.pipedrive.com/docs/api/v1/DealFields#getDealField\" target=\"_blank\" rel=\"noopener noreferrer\">GET /v1/dealFields</a>.
168
+ * @member {Number} channel
169
+ */
170
+ UpdateDealParameters.prototype['channel'] = undefined;
171
+
172
+ /**
173
+ * The optional ID to further distinguish the Marketing channel.
174
+ * @member {String} channel_id
175
+ */
176
+ UpdateDealParameters.prototype['channel_id'] = undefined;
177
+
158
178
  /**
159
179
  * Allowed values for the <code>status</code> property.
160
180
  * @enum {String}
@@ -8,7 +8,12 @@ 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 _BillingFrequency = _interopRequireDefault(require("./BillingFrequency"));
12
+ var _DealProductRequestBody = _interopRequireDefault(require("./DealProductRequestBody"));
11
13
  var _DealProductUnitDuration = _interopRequireDefault(require("./DealProductUnitDuration"));
14
+ var _NewDealProductAllOf = _interopRequireDefault(require("./NewDealProductAllOf"));
15
+ var _NewDealProductAllOf2 = _interopRequireDefault(require("./NewDealProductAllOf1"));
16
+ var _NewDealProductAllOf3 = _interopRequireDefault(require("./NewDealProductAllOf2"));
12
17
  /**
13
18
  * Pipedrive API v1
14
19
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -30,9 +35,17 @@ var UpdateDealProduct = /*#__PURE__*/function () {
30
35
  /**
31
36
  * Constructs a new <code>UpdateDealProduct</code>.
32
37
  * @alias module:model/UpdateDealProduct
38
+ * @implements module:model/DealProductRequestBody
39
+ * @implements module:model/NewDealProductAllOf
40
+ * @implements module:model/NewDealProductAllOf1
41
+ * @implements module:model/NewDealProductAllOf2
33
42
  */
34
43
  function UpdateDealProduct() {
35
44
  (0, _classCallCheck2["default"])(this, UpdateDealProduct);
45
+ _DealProductRequestBody["default"].initialize(this);
46
+ _NewDealProductAllOf["default"].initialize(this);
47
+ _NewDealProductAllOf2["default"].initialize(this);
48
+ _NewDealProductAllOf3["default"].initialize(this);
36
49
  UpdateDealProduct.initialize(this);
37
50
  }
38
51
 
@@ -57,6 +70,10 @@ var UpdateDealProduct = /*#__PURE__*/function () {
57
70
  value: function constructFromObject(data, obj) {
58
71
  if (data) {
59
72
  obj = obj || new UpdateDealProduct();
73
+ _DealProductRequestBody["default"].constructFromObject(data, obj);
74
+ _NewDealProductAllOf["default"].constructFromObject(data, obj);
75
+ _NewDealProductAllOf2["default"].constructFromObject(data, obj);
76
+ _NewDealProductAllOf3["default"].constructFromObject(data, obj);
60
77
  if (data.hasOwnProperty('product_id')) {
61
78
  obj['product_id'] = _ApiClient["default"].convertToType(data['product_id'], 'Number');
62
79
  delete data['product_id'];
@@ -105,6 +122,18 @@ var UpdateDealProduct = /*#__PURE__*/function () {
105
122
  obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
106
123
  delete data['enabled_flag'];
107
124
  }
125
+ if (data.hasOwnProperty('billing_frequency')) {
126
+ obj['billing_frequency'] = _BillingFrequency["default"].constructFromObject(data['billing_frequency']);
127
+ delete data['billing_frequency'];
128
+ }
129
+ if (data.hasOwnProperty('billing_frequency_cycles')) {
130
+ obj['billing_frequency_cycles'] = _ApiClient["default"].convertToType(data['billing_frequency_cycles'], 'Number');
131
+ delete data['billing_frequency_cycles'];
132
+ }
133
+ if (data.hasOwnProperty('billing_start_date')) {
134
+ obj['billing_start_date'] = _ApiClient["default"].convertToType(data['billing_start_date'], 'String');
135
+ delete data['billing_start_date'];
136
+ }
108
137
  if (Object.keys(data).length > 0) {
109
138
  Object.assign(obj, data);
110
139
  }
@@ -133,14 +162,14 @@ UpdateDealProduct.prototype['item_price'] = undefined;
133
162
  UpdateDealProduct.prototype['quantity'] = undefined;
134
163
 
135
164
  /**
136
- * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
165
+ * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage
137
166
  * @member {Number} discount
138
167
  * @default 0
139
168
  */
140
169
  UpdateDealProduct.prototype['discount'] = 0;
141
170
 
142
171
  /**
143
- * The type of the discount's value.
172
+ * The type of the discount's value
144
173
  * @member {module:model/UpdateDealProduct.DiscountTypeEnum} discount_type
145
174
  * @default 'percentage'
146
175
  */
@@ -160,7 +189,7 @@ UpdateDealProduct.prototype['duration'] = 1;
160
189
  UpdateDealProduct.prototype['duration_unit'] = undefined;
161
190
 
162
191
  /**
163
- * The ID of the product variation to use. When omitted, no variation will be used.
192
+ * The ID of the product variation to use. When omitted, no variation will be used
164
193
  * @member {Number} product_variation_id
165
194
  */
166
195
  UpdateDealProduct.prototype['product_variation_id'] = undefined;
@@ -179,18 +208,119 @@ UpdateDealProduct.prototype['comments'] = undefined;
179
208
  UpdateDealProduct.prototype['tax'] = 0;
180
209
 
181
210
  /**
182
- * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount.
211
+ * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount
183
212
  * @member {module:model/UpdateDealProduct.TaxMethodEnum} tax_method
184
213
  */
185
214
  UpdateDealProduct.prototype['tax_method'] = undefined;
186
215
 
187
216
  /**
188
- * 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.
217
+ * 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
189
218
  * @member {Boolean} enabled_flag
190
219
  * @default true
191
220
  */
192
221
  UpdateDealProduct.prototype['enabled_flag'] = true;
193
222
 
223
+ /**
224
+ * @member {module:model/BillingFrequency} billing_frequency
225
+ */
226
+ UpdateDealProduct.prototype['billing_frequency'] = undefined;
227
+
228
+ /**
229
+ * Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 312
230
+ * @member {Number} billing_frequency_cycles
231
+ */
232
+ UpdateDealProduct.prototype['billing_frequency_cycles'] = undefined;
233
+
234
+ /**
235
+ * Only available in Advanced and above plans The billing start date. Must be between 15 years in the past and 15 years in the future
236
+ * @member {String} billing_start_date
237
+ */
238
+ UpdateDealProduct.prototype['billing_start_date'] = undefined;
239
+
240
+ // Implement DealProductRequestBody interface:
241
+ /**
242
+ * The ID of the product to use
243
+ * @member {Number} product_id
244
+ */
245
+ _DealProductRequestBody["default"].prototype['product_id'] = undefined;
246
+ /**
247
+ * The price at which this product will be added to the deal
248
+ * @member {Number} item_price
249
+ */
250
+ _DealProductRequestBody["default"].prototype['item_price'] = undefined;
251
+ /**
252
+ * How many items of this product will be added to the deal
253
+ * @member {Number} quantity
254
+ */
255
+ _DealProductRequestBody["default"].prototype['quantity'] = undefined;
256
+ /**
257
+ * The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage
258
+ * @member {Number} discount
259
+ * @default 0
260
+ */
261
+ _DealProductRequestBody["default"].prototype['discount'] = 0;
262
+ /**
263
+ * The type of the discount's value
264
+ * @member {module:model/DealProductRequestBody.DiscountTypeEnum} discount_type
265
+ * @default 'percentage'
266
+ */
267
+ _DealProductRequestBody["default"].prototype['discount_type'] = 'percentage';
268
+ /**
269
+ * The duration of the product
270
+ * @member {Number} duration
271
+ * @default 1
272
+ */
273
+ _DealProductRequestBody["default"].prototype['duration'] = 1;
274
+ /**
275
+ * The unit duration of the product
276
+ * @member {module:model/DealProductUnitDuration} duration_unit
277
+ */
278
+ _DealProductRequestBody["default"].prototype['duration_unit'] = undefined;
279
+ /**
280
+ * The ID of the product variation to use. When omitted, no variation will be used
281
+ * @member {Number} product_variation_id
282
+ */
283
+ _DealProductRequestBody["default"].prototype['product_variation_id'] = undefined;
284
+ /**
285
+ * A textual comment associated with this product-deal attachment
286
+ * @member {String} comments
287
+ */
288
+ _DealProductRequestBody["default"].prototype['comments'] = undefined;
289
+ /**
290
+ * The tax percentage
291
+ * @member {Number} tax
292
+ * @default 0
293
+ */
294
+ _DealProductRequestBody["default"].prototype['tax'] = 0;
295
+ /**
296
+ * The tax option to be applied to the products. When using `inclusive`, the tax percentage will already be included in the price. When using `exclusive`, the tax will not be included in the price. When using `none`, no tax will be added. Use the `tax` field for defining the tax percentage amount
297
+ * @member {module:model/DealProductRequestBody.TaxMethodEnum} tax_method
298
+ */
299
+ _DealProductRequestBody["default"].prototype['tax_method'] = undefined;
300
+ /**
301
+ * 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
302
+ * @member {Boolean} enabled_flag
303
+ * @default true
304
+ */
305
+ _DealProductRequestBody["default"].prototype['enabled_flag'] = true;
306
+ // Implement NewDealProductAllOf interface:
307
+ /**
308
+ * @member {module:model/BillingFrequency} billing_frequency
309
+ */
310
+ _NewDealProductAllOf["default"].prototype['billing_frequency'] = undefined;
311
+ // Implement NewDealProductAllOf1 interface:
312
+ /**
313
+ * Only available in Advanced and above plans The number of times the billing frequency repeats for a product in a deal When `billing_frequency` is set to `one-time`, this field must be `null` For all the other values of `billing_frequency`, `null` represents a product billed indefinitely Must be a positive integer less or equal to 312
314
+ * @member {Number} billing_frequency_cycles
315
+ */
316
+ _NewDealProductAllOf2["default"].prototype['billing_frequency_cycles'] = undefined;
317
+ // Implement NewDealProductAllOf2 interface:
318
+ /**
319
+ * Only available in Advanced and above plans The billing start date. Must be between 15 years in the past and 15 years in the future
320
+ * @member {String} billing_start_date
321
+ */
322
+ _NewDealProductAllOf3["default"].prototype['billing_start_date'] = undefined;
323
+
194
324
  /**
195
325
  * Allowed values for the <code>discount_type</code> property.
196
326
  * @enum {String}