pipedrive 20.5.1 → 21.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/dist/model/AddProductAttachmentDetails.js +82 -9
- package/dist/model/BasicDealProduct.js +68 -6
- package/dist/model/NewDealProduct.js +82 -9
- package/dist/model/ProductAttachmentDetails.js +82 -9
- package/dist/model/ProductListItem.js +69 -6
- package/dist/model/UpdateDealProduct.js +68 -6
- package/package.json +1 -1
package/README.md
CHANGED
@@ -275,7 +275,7 @@ app.get('/', async (req, res) => {
|
|
275
275
|
|
276
276
|
app.get('/callback', (req, res) => {
|
277
277
|
const authCode = req.query.code;
|
278
|
-
const promise = apiClient.authorize(
|
278
|
+
const promise = apiClient.authorize(authCode);
|
279
279
|
|
280
280
|
promise.then(() => {
|
281
281
|
req.session.accessToken = apiClient.authentications.oauth2.accessToken;
|
@@ -83,9 +83,13 @@ var AddProductAttachmentDetails = /*#__PURE__*/function () {
|
|
83
83
|
obj['quantity'] = _ApiClient["default"].convertToType(data['quantity'], 'Number');
|
84
84
|
delete data['quantity'];
|
85
85
|
}
|
86
|
-
if (data.hasOwnProperty('
|
87
|
-
obj['
|
88
|
-
delete data['
|
86
|
+
if (data.hasOwnProperty('discount')) {
|
87
|
+
obj['discount'] = _ApiClient["default"].convertToType(data['discount'], 'Number');
|
88
|
+
delete data['discount'];
|
89
|
+
}
|
90
|
+
if (data.hasOwnProperty('discount_type')) {
|
91
|
+
obj['discount_type'] = _ApiClient["default"].convertToType(data['discount_type'], 'String');
|
92
|
+
delete data['discount_type'];
|
89
93
|
}
|
90
94
|
if (data.hasOwnProperty('duration')) {
|
91
95
|
obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number');
|
@@ -107,6 +111,10 @@ var AddProductAttachmentDetails = /*#__PURE__*/function () {
|
|
107
111
|
obj['tax'] = _ApiClient["default"].convertToType(data['tax'], 'Number');
|
108
112
|
delete data['tax'];
|
109
113
|
}
|
114
|
+
if (data.hasOwnProperty('tax_method')) {
|
115
|
+
obj['tax_method'] = _ApiClient["default"].convertToType(data['tax_method'], 'String');
|
116
|
+
delete data['tax_method'];
|
117
|
+
}
|
110
118
|
if (data.hasOwnProperty('enabled_flag')) {
|
111
119
|
obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
|
112
120
|
delete data['enabled_flag'];
|
@@ -183,11 +191,18 @@ AddProductAttachmentDetails.prototype['item_price'] = undefined;
|
|
183
191
|
AddProductAttachmentDetails.prototype['quantity'] = undefined;
|
184
192
|
|
185
193
|
/**
|
186
|
-
* The discount
|
187
|
-
* @member {Number}
|
194
|
+
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
|
195
|
+
* @member {Number} discount
|
188
196
|
* @default 0
|
189
197
|
*/
|
190
|
-
AddProductAttachmentDetails.prototype['
|
198
|
+
AddProductAttachmentDetails.prototype['discount'] = 0;
|
199
|
+
|
200
|
+
/**
|
201
|
+
* The type of the discount's value.
|
202
|
+
* @member {module:model/AddProductAttachmentDetails.DiscountTypeEnum} discount_type
|
203
|
+
* @default 'percentage'
|
204
|
+
*/
|
205
|
+
AddProductAttachmentDetails.prototype['discount_type'] = 'percentage';
|
191
206
|
|
192
207
|
/**
|
193
208
|
* The duration of the product. If omitted, will be set to 1.
|
@@ -220,6 +235,12 @@ AddProductAttachmentDetails.prototype['comments'] = undefined;
|
|
220
235
|
*/
|
221
236
|
AddProductAttachmentDetails.prototype['tax'] = undefined;
|
222
237
|
|
238
|
+
/**
|
239
|
+
* 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.
|
240
|
+
* @member {module:model/AddProductAttachmentDetails.TaxMethodEnum} tax_method
|
241
|
+
*/
|
242
|
+
AddProductAttachmentDetails.prototype['tax_method'] = undefined;
|
243
|
+
|
223
244
|
/**
|
224
245
|
* 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.
|
225
246
|
* @member {Boolean} enabled_flag
|
@@ -310,11 +331,17 @@ _ProductAttachmentDetails["default"].prototype['item_price'] = undefined;
|
|
310
331
|
*/
|
311
332
|
_ProductAttachmentDetails["default"].prototype['quantity'] = undefined;
|
312
333
|
/**
|
313
|
-
* The discount
|
314
|
-
* @member {Number}
|
334
|
+
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
|
335
|
+
* @member {Number} discount
|
315
336
|
* @default 0
|
316
337
|
*/
|
317
|
-
_ProductAttachmentDetails["default"].prototype['
|
338
|
+
_ProductAttachmentDetails["default"].prototype['discount'] = 0;
|
339
|
+
/**
|
340
|
+
* The type of the discount's value.
|
341
|
+
* @member {module:model/ProductAttachmentDetails.DiscountTypeEnum} discount_type
|
342
|
+
* @default 'percentage'
|
343
|
+
*/
|
344
|
+
_ProductAttachmentDetails["default"].prototype['discount_type'] = 'percentage';
|
318
345
|
/**
|
319
346
|
* The duration of the product. If omitted, will be set to 1.
|
320
347
|
* @member {Number} duration
|
@@ -341,6 +368,11 @@ _ProductAttachmentDetails["default"].prototype['comments'] = undefined;
|
|
341
368
|
* @member {Number} tax
|
342
369
|
*/
|
343
370
|
_ProductAttachmentDetails["default"].prototype['tax'] = undefined;
|
371
|
+
/**
|
372
|
+
* 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.
|
373
|
+
* @member {module:model/ProductAttachmentDetails.TaxMethodEnum} tax_method
|
374
|
+
*/
|
375
|
+
_ProductAttachmentDetails["default"].prototype['tax_method'] = undefined;
|
344
376
|
/**
|
345
377
|
* 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.
|
346
378
|
* @member {Boolean} enabled_flag
|
@@ -403,5 +435,46 @@ _ProductAttachmentDetails["default"].prototype['name'] = undefined;
|
|
403
435
|
* @member {Number} product_attachment_id
|
404
436
|
*/
|
405
437
|
_AddProductAttachmentDetailsAllOf["default"].prototype['product_attachment_id'] = undefined;
|
438
|
+
|
439
|
+
/**
|
440
|
+
* Allowed values for the <code>discount_type</code> property.
|
441
|
+
* @enum {String}
|
442
|
+
* @readonly
|
443
|
+
*/
|
444
|
+
AddProductAttachmentDetails['DiscountTypeEnum'] = {
|
445
|
+
/**
|
446
|
+
* value: "percentage"
|
447
|
+
* @const
|
448
|
+
*/
|
449
|
+
"percentage": "percentage",
|
450
|
+
/**
|
451
|
+
* value: "amount"
|
452
|
+
* @const
|
453
|
+
*/
|
454
|
+
"amount": "amount"
|
455
|
+
};
|
456
|
+
|
457
|
+
/**
|
458
|
+
* Allowed values for the <code>tax_method</code> property.
|
459
|
+
* @enum {String}
|
460
|
+
* @readonly
|
461
|
+
*/
|
462
|
+
AddProductAttachmentDetails['TaxMethodEnum'] = {
|
463
|
+
/**
|
464
|
+
* value: "exclusive"
|
465
|
+
* @const
|
466
|
+
*/
|
467
|
+
"exclusive": "exclusive",
|
468
|
+
/**
|
469
|
+
* value: "inclusive"
|
470
|
+
* @const
|
471
|
+
*/
|
472
|
+
"inclusive": "inclusive",
|
473
|
+
/**
|
474
|
+
* value: "none"
|
475
|
+
* @const
|
476
|
+
*/
|
477
|
+
"none": "none"
|
478
|
+
};
|
406
479
|
var _default = AddProductAttachmentDetails;
|
407
480
|
exports["default"] = _default;
|
@@ -76,9 +76,13 @@ var BasicDealProduct = /*#__PURE__*/function () {
|
|
76
76
|
obj['quantity'] = _ApiClient["default"].convertToType(data['quantity'], 'Number');
|
77
77
|
delete data['quantity'];
|
78
78
|
}
|
79
|
-
if (data.hasOwnProperty('
|
80
|
-
obj['
|
81
|
-
delete data['
|
79
|
+
if (data.hasOwnProperty('discount')) {
|
80
|
+
obj['discount'] = _ApiClient["default"].convertToType(data['discount'], 'Number');
|
81
|
+
delete data['discount'];
|
82
|
+
}
|
83
|
+
if (data.hasOwnProperty('discount_type')) {
|
84
|
+
obj['discount_type'] = _ApiClient["default"].convertToType(data['discount_type'], 'String');
|
85
|
+
delete data['discount_type'];
|
82
86
|
}
|
83
87
|
if (data.hasOwnProperty('duration')) {
|
84
88
|
obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number');
|
@@ -100,6 +104,10 @@ var BasicDealProduct = /*#__PURE__*/function () {
|
|
100
104
|
obj['tax'] = _ApiClient["default"].convertToType(data['tax'], 'Number');
|
101
105
|
delete data['tax'];
|
102
106
|
}
|
107
|
+
if (data.hasOwnProperty('tax_method')) {
|
108
|
+
obj['tax_method'] = _ApiClient["default"].convertToType(data['tax_method'], 'String');
|
109
|
+
delete data['tax_method'];
|
110
|
+
}
|
103
111
|
if (data.hasOwnProperty('enabled_flag')) {
|
104
112
|
obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
|
105
113
|
delete data['enabled_flag'];
|
@@ -132,11 +140,18 @@ BasicDealProduct.prototype['item_price'] = undefined;
|
|
132
140
|
BasicDealProduct.prototype['quantity'] = undefined;
|
133
141
|
|
134
142
|
/**
|
135
|
-
* The discount
|
136
|
-
* @member {Number}
|
143
|
+
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
|
144
|
+
* @member {Number} discount
|
137
145
|
* @default 0
|
138
146
|
*/
|
139
|
-
BasicDealProduct.prototype['
|
147
|
+
BasicDealProduct.prototype['discount'] = 0;
|
148
|
+
|
149
|
+
/**
|
150
|
+
* The type of the discount's value.
|
151
|
+
* @member {module:model/BasicDealProduct.DiscountTypeEnum} discount_type
|
152
|
+
* @default 'percentage'
|
153
|
+
*/
|
154
|
+
BasicDealProduct.prototype['discount_type'] = 'percentage';
|
140
155
|
|
141
156
|
/**
|
142
157
|
* The duration of the product. If omitted, will be set to 1.
|
@@ -170,11 +185,58 @@ BasicDealProduct.prototype['comments'] = undefined;
|
|
170
185
|
*/
|
171
186
|
BasicDealProduct.prototype['tax'] = 0;
|
172
187
|
|
188
|
+
/**
|
189
|
+
* 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.
|
190
|
+
* @member {module:model/BasicDealProduct.TaxMethodEnum} tax_method
|
191
|
+
*/
|
192
|
+
BasicDealProduct.prototype['tax_method'] = undefined;
|
193
|
+
|
173
194
|
/**
|
174
195
|
* 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.
|
175
196
|
* @member {Boolean} enabled_flag
|
176
197
|
* @default true
|
177
198
|
*/
|
178
199
|
BasicDealProduct.prototype['enabled_flag'] = true;
|
200
|
+
|
201
|
+
/**
|
202
|
+
* Allowed values for the <code>discount_type</code> property.
|
203
|
+
* @enum {String}
|
204
|
+
* @readonly
|
205
|
+
*/
|
206
|
+
BasicDealProduct['DiscountTypeEnum'] = {
|
207
|
+
/**
|
208
|
+
* value: "percentage"
|
209
|
+
* @const
|
210
|
+
*/
|
211
|
+
"percentage": "percentage",
|
212
|
+
/**
|
213
|
+
* value: "amount"
|
214
|
+
* @const
|
215
|
+
*/
|
216
|
+
"amount": "amount"
|
217
|
+
};
|
218
|
+
|
219
|
+
/**
|
220
|
+
* Allowed values for the <code>tax_method</code> property.
|
221
|
+
* @enum {String}
|
222
|
+
* @readonly
|
223
|
+
*/
|
224
|
+
BasicDealProduct['TaxMethodEnum'] = {
|
225
|
+
/**
|
226
|
+
* value: "exclusive"
|
227
|
+
* @const
|
228
|
+
*/
|
229
|
+
"exclusive": "exclusive",
|
230
|
+
/**
|
231
|
+
* value: "inclusive"
|
232
|
+
* @const
|
233
|
+
*/
|
234
|
+
"inclusive": "inclusive",
|
235
|
+
/**
|
236
|
+
* value: "none"
|
237
|
+
* @const
|
238
|
+
*/
|
239
|
+
"none": "none"
|
240
|
+
};
|
179
241
|
var _default = BasicDealProduct;
|
180
242
|
exports["default"] = _default;
|
@@ -80,9 +80,13 @@ var NewDealProduct = /*#__PURE__*/function () {
|
|
80
80
|
obj['quantity'] = _ApiClient["default"].convertToType(data['quantity'], 'Number');
|
81
81
|
delete data['quantity'];
|
82
82
|
}
|
83
|
-
if (data.hasOwnProperty('
|
84
|
-
obj['
|
85
|
-
delete data['
|
83
|
+
if (data.hasOwnProperty('discount')) {
|
84
|
+
obj['discount'] = _ApiClient["default"].convertToType(data['discount'], 'Number');
|
85
|
+
delete data['discount'];
|
86
|
+
}
|
87
|
+
if (data.hasOwnProperty('discount_type')) {
|
88
|
+
obj['discount_type'] = _ApiClient["default"].convertToType(data['discount_type'], 'String');
|
89
|
+
delete data['discount_type'];
|
86
90
|
}
|
87
91
|
if (data.hasOwnProperty('duration')) {
|
88
92
|
obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number');
|
@@ -104,6 +108,10 @@ var NewDealProduct = /*#__PURE__*/function () {
|
|
104
108
|
obj['tax'] = _ApiClient["default"].convertToType(data['tax'], 'Number');
|
105
109
|
delete data['tax'];
|
106
110
|
}
|
111
|
+
if (data.hasOwnProperty('tax_method')) {
|
112
|
+
obj['tax_method'] = _ApiClient["default"].convertToType(data['tax_method'], 'String');
|
113
|
+
delete data['tax_method'];
|
114
|
+
}
|
107
115
|
if (data.hasOwnProperty('enabled_flag')) {
|
108
116
|
obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
|
109
117
|
delete data['enabled_flag'];
|
@@ -136,11 +144,18 @@ NewDealProduct.prototype['item_price'] = undefined;
|
|
136
144
|
NewDealProduct.prototype['quantity'] = undefined;
|
137
145
|
|
138
146
|
/**
|
139
|
-
* The discount
|
140
|
-
* @member {Number}
|
147
|
+
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
|
148
|
+
* @member {Number} discount
|
141
149
|
* @default 0
|
142
150
|
*/
|
143
|
-
NewDealProduct.prototype['
|
151
|
+
NewDealProduct.prototype['discount'] = 0;
|
152
|
+
|
153
|
+
/**
|
154
|
+
* The type of the discount's value.
|
155
|
+
* @member {module:model/NewDealProduct.DiscountTypeEnum} discount_type
|
156
|
+
* @default 'percentage'
|
157
|
+
*/
|
158
|
+
NewDealProduct.prototype['discount_type'] = 'percentage';
|
144
159
|
|
145
160
|
/**
|
146
161
|
* The duration of the product. If omitted, will be set to 1.
|
@@ -174,6 +189,12 @@ NewDealProduct.prototype['comments'] = undefined;
|
|
174
189
|
*/
|
175
190
|
NewDealProduct.prototype['tax'] = 0;
|
176
191
|
|
192
|
+
/**
|
193
|
+
* 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.
|
194
|
+
* @member {module:model/NewDealProduct.TaxMethodEnum} tax_method
|
195
|
+
*/
|
196
|
+
NewDealProduct.prototype['tax_method'] = undefined;
|
197
|
+
|
177
198
|
/**
|
178
199
|
* 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
200
|
* @member {Boolean} enabled_flag
|
@@ -198,11 +219,17 @@ _BasicDealProduct["default"].prototype['item_price'] = undefined;
|
|
198
219
|
*/
|
199
220
|
_BasicDealProduct["default"].prototype['quantity'] = undefined;
|
200
221
|
/**
|
201
|
-
* The discount
|
202
|
-
* @member {Number}
|
222
|
+
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
|
223
|
+
* @member {Number} discount
|
203
224
|
* @default 0
|
204
225
|
*/
|
205
|
-
_BasicDealProduct["default"].prototype['
|
226
|
+
_BasicDealProduct["default"].prototype['discount'] = 0;
|
227
|
+
/**
|
228
|
+
* The type of the discount's value.
|
229
|
+
* @member {module:model/BasicDealProduct.DiscountTypeEnum} discount_type
|
230
|
+
* @default 'percentage'
|
231
|
+
*/
|
232
|
+
_BasicDealProduct["default"].prototype['discount_type'] = 'percentage';
|
206
233
|
/**
|
207
234
|
* The duration of the product. If omitted, will be set to 1.
|
208
235
|
* @member {Number} duration
|
@@ -230,11 +257,57 @@ _BasicDealProduct["default"].prototype['comments'] = undefined;
|
|
230
257
|
* @default 0
|
231
258
|
*/
|
232
259
|
_BasicDealProduct["default"].prototype['tax'] = 0;
|
260
|
+
/**
|
261
|
+
* 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.
|
262
|
+
* @member {module:model/BasicDealProduct.TaxMethodEnum} tax_method
|
263
|
+
*/
|
264
|
+
_BasicDealProduct["default"].prototype['tax_method'] = undefined;
|
233
265
|
/**
|
234
266
|
* 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
267
|
* @member {Boolean} enabled_flag
|
236
268
|
* @default true
|
237
269
|
*/
|
238
270
|
_BasicDealProduct["default"].prototype['enabled_flag'] = true;
|
271
|
+
|
272
|
+
/**
|
273
|
+
* Allowed values for the <code>discount_type</code> property.
|
274
|
+
* @enum {String}
|
275
|
+
* @readonly
|
276
|
+
*/
|
277
|
+
NewDealProduct['DiscountTypeEnum'] = {
|
278
|
+
/**
|
279
|
+
* value: "percentage"
|
280
|
+
* @const
|
281
|
+
*/
|
282
|
+
"percentage": "percentage",
|
283
|
+
/**
|
284
|
+
* value: "amount"
|
285
|
+
* @const
|
286
|
+
*/
|
287
|
+
"amount": "amount"
|
288
|
+
};
|
289
|
+
|
290
|
+
/**
|
291
|
+
* Allowed values for the <code>tax_method</code> property.
|
292
|
+
* @enum {String}
|
293
|
+
* @readonly
|
294
|
+
*/
|
295
|
+
NewDealProduct['TaxMethodEnum'] = {
|
296
|
+
/**
|
297
|
+
* value: "exclusive"
|
298
|
+
* @const
|
299
|
+
*/
|
300
|
+
"exclusive": "exclusive",
|
301
|
+
/**
|
302
|
+
* value: "inclusive"
|
303
|
+
* @const
|
304
|
+
*/
|
305
|
+
"inclusive": "inclusive",
|
306
|
+
/**
|
307
|
+
* value: "none"
|
308
|
+
* @const
|
309
|
+
*/
|
310
|
+
"none": "none"
|
311
|
+
};
|
239
312
|
var _default = NewDealProduct;
|
240
313
|
exports["default"] = _default;
|
@@ -83,9 +83,13 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
|
|
83
83
|
obj['quantity'] = _ApiClient["default"].convertToType(data['quantity'], 'Number');
|
84
84
|
delete data['quantity'];
|
85
85
|
}
|
86
|
-
if (data.hasOwnProperty('
|
87
|
-
obj['
|
88
|
-
delete data['
|
86
|
+
if (data.hasOwnProperty('discount')) {
|
87
|
+
obj['discount'] = _ApiClient["default"].convertToType(data['discount'], 'Number');
|
88
|
+
delete data['discount'];
|
89
|
+
}
|
90
|
+
if (data.hasOwnProperty('discount_type')) {
|
91
|
+
obj['discount_type'] = _ApiClient["default"].convertToType(data['discount_type'], 'String');
|
92
|
+
delete data['discount_type'];
|
89
93
|
}
|
90
94
|
if (data.hasOwnProperty('duration')) {
|
91
95
|
obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number');
|
@@ -107,6 +111,10 @@ var ProductAttachmentDetails = /*#__PURE__*/function () {
|
|
107
111
|
obj['tax'] = _ApiClient["default"].convertToType(data['tax'], 'Number');
|
108
112
|
delete data['tax'];
|
109
113
|
}
|
114
|
+
if (data.hasOwnProperty('tax_method')) {
|
115
|
+
obj['tax_method'] = _ApiClient["default"].convertToType(data['tax_method'], 'String');
|
116
|
+
delete data['tax_method'];
|
117
|
+
}
|
110
118
|
if (data.hasOwnProperty('enabled_flag')) {
|
111
119
|
obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
|
112
120
|
delete data['enabled_flag'];
|
@@ -179,11 +187,18 @@ ProductAttachmentDetails.prototype['item_price'] = undefined;
|
|
179
187
|
ProductAttachmentDetails.prototype['quantity'] = undefined;
|
180
188
|
|
181
189
|
/**
|
182
|
-
* The discount
|
183
|
-
* @member {Number}
|
190
|
+
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
|
191
|
+
* @member {Number} discount
|
184
192
|
* @default 0
|
185
193
|
*/
|
186
|
-
ProductAttachmentDetails.prototype['
|
194
|
+
ProductAttachmentDetails.prototype['discount'] = 0;
|
195
|
+
|
196
|
+
/**
|
197
|
+
* The type of the discount's value.
|
198
|
+
* @member {module:model/ProductAttachmentDetails.DiscountTypeEnum} discount_type
|
199
|
+
* @default 'percentage'
|
200
|
+
*/
|
201
|
+
ProductAttachmentDetails.prototype['discount_type'] = 'percentage';
|
187
202
|
|
188
203
|
/**
|
189
204
|
* The duration of the product. If omitted, will be set to 1.
|
@@ -216,6 +231,12 @@ ProductAttachmentDetails.prototype['comments'] = undefined;
|
|
216
231
|
*/
|
217
232
|
ProductAttachmentDetails.prototype['tax'] = undefined;
|
218
233
|
|
234
|
+
/**
|
235
|
+
* 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.
|
236
|
+
* @member {module:model/ProductAttachmentDetails.TaxMethodEnum} tax_method
|
237
|
+
*/
|
238
|
+
ProductAttachmentDetails.prototype['tax_method'] = undefined;
|
239
|
+
|
219
240
|
/**
|
220
241
|
* 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
242
|
* @member {Boolean} enabled_flag
|
@@ -300,11 +321,17 @@ _BasicDealProduct["default"].prototype['item_price'] = undefined;
|
|
300
321
|
*/
|
301
322
|
_BasicDealProduct["default"].prototype['quantity'] = undefined;
|
302
323
|
/**
|
303
|
-
* The discount
|
304
|
-
* @member {Number}
|
324
|
+
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
|
325
|
+
* @member {Number} discount
|
305
326
|
* @default 0
|
306
327
|
*/
|
307
|
-
_BasicDealProduct["default"].prototype['
|
328
|
+
_BasicDealProduct["default"].prototype['discount'] = 0;
|
329
|
+
/**
|
330
|
+
* The type of the discount's value.
|
331
|
+
* @member {module:model/BasicDealProduct.DiscountTypeEnum} discount_type
|
332
|
+
* @default 'percentage'
|
333
|
+
*/
|
334
|
+
_BasicDealProduct["default"].prototype['discount_type'] = 'percentage';
|
308
335
|
/**
|
309
336
|
* The duration of the product. If omitted, will be set to 1.
|
310
337
|
* @member {Number} duration
|
@@ -332,6 +359,11 @@ _BasicDealProduct["default"].prototype['comments'] = undefined;
|
|
332
359
|
* @default 0
|
333
360
|
*/
|
334
361
|
_BasicDealProduct["default"].prototype['tax'] = 0;
|
362
|
+
/**
|
363
|
+
* 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.
|
364
|
+
* @member {module:model/BasicDealProduct.TaxMethodEnum} tax_method
|
365
|
+
*/
|
366
|
+
_BasicDealProduct["default"].prototype['tax_method'] = undefined;
|
335
367
|
/**
|
336
368
|
* 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
369
|
* @member {Boolean} enabled_flag
|
@@ -404,5 +436,46 @@ _ProductAttachementFields["default"].prototype['tax'] = undefined;
|
|
404
436
|
* @member {String} name
|
405
437
|
*/
|
406
438
|
_ProductAttachementFields["default"].prototype['name'] = undefined;
|
439
|
+
|
440
|
+
/**
|
441
|
+
* Allowed values for the <code>discount_type</code> property.
|
442
|
+
* @enum {String}
|
443
|
+
* @readonly
|
444
|
+
*/
|
445
|
+
ProductAttachmentDetails['DiscountTypeEnum'] = {
|
446
|
+
/**
|
447
|
+
* value: "percentage"
|
448
|
+
* @const
|
449
|
+
*/
|
450
|
+
"percentage": "percentage",
|
451
|
+
/**
|
452
|
+
* value: "amount"
|
453
|
+
* @const
|
454
|
+
*/
|
455
|
+
"amount": "amount"
|
456
|
+
};
|
457
|
+
|
458
|
+
/**
|
459
|
+
* Allowed values for the <code>tax_method</code> property.
|
460
|
+
* @enum {String}
|
461
|
+
* @readonly
|
462
|
+
*/
|
463
|
+
ProductAttachmentDetails['TaxMethodEnum'] = {
|
464
|
+
/**
|
465
|
+
* value: "exclusive"
|
466
|
+
* @const
|
467
|
+
*/
|
468
|
+
"exclusive": "exclusive",
|
469
|
+
/**
|
470
|
+
* value: "inclusive"
|
471
|
+
* @const
|
472
|
+
*/
|
473
|
+
"inclusive": "inclusive",
|
474
|
+
/**
|
475
|
+
* value: "none"
|
476
|
+
* @const
|
477
|
+
*/
|
478
|
+
"none": "none"
|
479
|
+
};
|
407
480
|
var _default = ProductAttachmentDetails;
|
408
481
|
exports["default"] = _default;
|
@@ -81,9 +81,13 @@ var ProductListItem = /*#__PURE__*/function () {
|
|
81
81
|
obj['item_price'] = _ApiClient["default"].convertToType(data['item_price'], 'Number');
|
82
82
|
delete data['item_price'];
|
83
83
|
}
|
84
|
-
if (data.hasOwnProperty('
|
85
|
-
obj['
|
86
|
-
delete data['
|
84
|
+
if (data.hasOwnProperty('discount')) {
|
85
|
+
obj['discount'] = _ApiClient["default"].convertToType(data['discount'], 'Number');
|
86
|
+
delete data['discount'];
|
87
|
+
}
|
88
|
+
if (data.hasOwnProperty('discount_type')) {
|
89
|
+
obj['discount_type'] = _ApiClient["default"].convertToType(data['discount_type'], 'String');
|
90
|
+
delete data['discount_type'];
|
87
91
|
}
|
88
92
|
if (data.hasOwnProperty('duration')) {
|
89
93
|
obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number');
|
@@ -129,6 +133,10 @@ var ProductListItem = /*#__PURE__*/function () {
|
|
129
133
|
obj['tax'] = _ApiClient["default"].convertToType(data['tax'], 'Number');
|
130
134
|
delete data['tax'];
|
131
135
|
}
|
136
|
+
if (data.hasOwnProperty('tax_method')) {
|
137
|
+
obj['tax_method'] = _ApiClient["default"].convertToType(data['tax_method'], 'String');
|
138
|
+
delete data['tax_method'];
|
139
|
+
}
|
132
140
|
if (data.hasOwnProperty('name')) {
|
133
141
|
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
134
142
|
delete data['name'];
|
@@ -195,10 +203,18 @@ ProductListItem.prototype['product_variation_id'] = undefined;
|
|
195
203
|
ProductListItem.prototype['item_price'] = undefined;
|
196
204
|
|
197
205
|
/**
|
198
|
-
* The discount
|
199
|
-
* @member {Number}
|
206
|
+
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
|
207
|
+
* @member {Number} discount
|
208
|
+
* @default 0
|
209
|
+
*/
|
210
|
+
ProductListItem.prototype['discount'] = 0;
|
211
|
+
|
212
|
+
/**
|
213
|
+
* The type of the discount's value.
|
214
|
+
* @member {module:model/ProductListItem.DiscountTypeEnum} discount_type
|
215
|
+
* @default 'percentage'
|
200
216
|
*/
|
201
|
-
ProductListItem.prototype['
|
217
|
+
ProductListItem.prototype['discount_type'] = 'percentage';
|
202
218
|
|
203
219
|
/**
|
204
220
|
* The duration of the product
|
@@ -266,6 +282,12 @@ ProductListItem.prototype['active_flag'] = undefined;
|
|
266
282
|
*/
|
267
283
|
ProductListItem.prototype['tax'] = undefined;
|
268
284
|
|
285
|
+
/**
|
286
|
+
* 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.
|
287
|
+
* @member {module:model/ProductListItem.TaxMethodEnum} tax_method
|
288
|
+
*/
|
289
|
+
ProductListItem.prototype['tax_method'] = undefined;
|
290
|
+
|
269
291
|
/**
|
270
292
|
* The product name
|
271
293
|
* @member {String} name
|
@@ -294,5 +316,46 @@ ProductListItem.prototype['quantity'] = undefined;
|
|
294
316
|
* @member {module:model/ProductWithObjectPrices} product
|
295
317
|
*/
|
296
318
|
ProductListItem.prototype['product'] = undefined;
|
319
|
+
|
320
|
+
/**
|
321
|
+
* Allowed values for the <code>discount_type</code> property.
|
322
|
+
* @enum {String}
|
323
|
+
* @readonly
|
324
|
+
*/
|
325
|
+
ProductListItem['DiscountTypeEnum'] = {
|
326
|
+
/**
|
327
|
+
* value: "percentage"
|
328
|
+
* @const
|
329
|
+
*/
|
330
|
+
"percentage": "percentage",
|
331
|
+
/**
|
332
|
+
* value: "amount"
|
333
|
+
* @const
|
334
|
+
*/
|
335
|
+
"amount": "amount"
|
336
|
+
};
|
337
|
+
|
338
|
+
/**
|
339
|
+
* Allowed values for the <code>tax_method</code> property.
|
340
|
+
* @enum {String}
|
341
|
+
* @readonly
|
342
|
+
*/
|
343
|
+
ProductListItem['TaxMethodEnum'] = {
|
344
|
+
/**
|
345
|
+
* value: "exclusive"
|
346
|
+
* @const
|
347
|
+
*/
|
348
|
+
"exclusive": "exclusive",
|
349
|
+
/**
|
350
|
+
* value: "inclusive"
|
351
|
+
* @const
|
352
|
+
*/
|
353
|
+
"inclusive": "inclusive",
|
354
|
+
/**
|
355
|
+
* value: "none"
|
356
|
+
* @const
|
357
|
+
*/
|
358
|
+
"none": "none"
|
359
|
+
};
|
297
360
|
var _default = ProductListItem;
|
298
361
|
exports["default"] = _default;
|
@@ -69,9 +69,13 @@ var UpdateDealProduct = /*#__PURE__*/function () {
|
|
69
69
|
obj['quantity'] = _ApiClient["default"].convertToType(data['quantity'], 'Number');
|
70
70
|
delete data['quantity'];
|
71
71
|
}
|
72
|
-
if (data.hasOwnProperty('
|
73
|
-
obj['
|
74
|
-
delete data['
|
72
|
+
if (data.hasOwnProperty('discount')) {
|
73
|
+
obj['discount'] = _ApiClient["default"].convertToType(data['discount'], 'Number');
|
74
|
+
delete data['discount'];
|
75
|
+
}
|
76
|
+
if (data.hasOwnProperty('discount_type')) {
|
77
|
+
obj['discount_type'] = _ApiClient["default"].convertToType(data['discount_type'], 'String');
|
78
|
+
delete data['discount_type'];
|
75
79
|
}
|
76
80
|
if (data.hasOwnProperty('duration')) {
|
77
81
|
obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number');
|
@@ -93,6 +97,10 @@ var UpdateDealProduct = /*#__PURE__*/function () {
|
|
93
97
|
obj['tax'] = _ApiClient["default"].convertToType(data['tax'], 'Number');
|
94
98
|
delete data['tax'];
|
95
99
|
}
|
100
|
+
if (data.hasOwnProperty('tax_method')) {
|
101
|
+
obj['tax_method'] = _ApiClient["default"].convertToType(data['tax_method'], 'String');
|
102
|
+
delete data['tax_method'];
|
103
|
+
}
|
96
104
|
if (data.hasOwnProperty('enabled_flag')) {
|
97
105
|
obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
|
98
106
|
delete data['enabled_flag'];
|
@@ -125,11 +133,18 @@ UpdateDealProduct.prototype['item_price'] = undefined;
|
|
125
133
|
UpdateDealProduct.prototype['quantity'] = undefined;
|
126
134
|
|
127
135
|
/**
|
128
|
-
* The discount
|
129
|
-
* @member {Number}
|
136
|
+
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage.
|
137
|
+
* @member {Number} discount
|
130
138
|
* @default 0
|
131
139
|
*/
|
132
|
-
UpdateDealProduct.prototype['
|
140
|
+
UpdateDealProduct.prototype['discount'] = 0;
|
141
|
+
|
142
|
+
/**
|
143
|
+
* The type of the discount's value.
|
144
|
+
* @member {module:model/UpdateDealProduct.DiscountTypeEnum} discount_type
|
145
|
+
* @default 'percentage'
|
146
|
+
*/
|
147
|
+
UpdateDealProduct.prototype['discount_type'] = 'percentage';
|
133
148
|
|
134
149
|
/**
|
135
150
|
* The duration of the product
|
@@ -163,11 +178,58 @@ UpdateDealProduct.prototype['comments'] = undefined;
|
|
163
178
|
*/
|
164
179
|
UpdateDealProduct.prototype['tax'] = 0;
|
165
180
|
|
181
|
+
/**
|
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.
|
183
|
+
* @member {module:model/UpdateDealProduct.TaxMethodEnum} tax_method
|
184
|
+
*/
|
185
|
+
UpdateDealProduct.prototype['tax_method'] = undefined;
|
186
|
+
|
166
187
|
/**
|
167
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.
|
168
189
|
* @member {Boolean} enabled_flag
|
169
190
|
* @default true
|
170
191
|
*/
|
171
192
|
UpdateDealProduct.prototype['enabled_flag'] = true;
|
193
|
+
|
194
|
+
/**
|
195
|
+
* Allowed values for the <code>discount_type</code> property.
|
196
|
+
* @enum {String}
|
197
|
+
* @readonly
|
198
|
+
*/
|
199
|
+
UpdateDealProduct['DiscountTypeEnum'] = {
|
200
|
+
/**
|
201
|
+
* value: "percentage"
|
202
|
+
* @const
|
203
|
+
*/
|
204
|
+
"percentage": "percentage",
|
205
|
+
/**
|
206
|
+
* value: "amount"
|
207
|
+
* @const
|
208
|
+
*/
|
209
|
+
"amount": "amount"
|
210
|
+
};
|
211
|
+
|
212
|
+
/**
|
213
|
+
* Allowed values for the <code>tax_method</code> property.
|
214
|
+
* @enum {String}
|
215
|
+
* @readonly
|
216
|
+
*/
|
217
|
+
UpdateDealProduct['TaxMethodEnum'] = {
|
218
|
+
/**
|
219
|
+
* value: "exclusive"
|
220
|
+
* @const
|
221
|
+
*/
|
222
|
+
"exclusive": "exclusive",
|
223
|
+
/**
|
224
|
+
* value: "inclusive"
|
225
|
+
* @const
|
226
|
+
*/
|
227
|
+
"inclusive": "inclusive",
|
228
|
+
/**
|
229
|
+
* value: "none"
|
230
|
+
* @const
|
231
|
+
*/
|
232
|
+
"none": "none"
|
233
|
+
};
|
172
234
|
var _default = UpdateDealProduct;
|
173
235
|
exports["default"] = _default;
|