pipedrive 22.6.0 → 22.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (86) hide show
  1. package/README.md +9 -6
  2. package/dist/ApiClient.js +8 -4
  3. package/dist/api/ActivitiesApi.js +12 -1
  4. package/dist/api/ActivityFieldsApi.js +12 -1
  5. package/dist/api/ActivityTypesApi.js +12 -1
  6. package/dist/api/BillingApi.js +12 -1
  7. package/dist/api/CallLogsApi.js +12 -1
  8. package/dist/api/ChannelsApi.js +12 -1
  9. package/dist/api/CurrenciesApi.js +12 -1
  10. package/dist/api/DealFieldsApi.js +12 -1
  11. package/dist/api/DealsApi.js +12 -1
  12. package/dist/api/FilesApi.js +12 -1
  13. package/dist/api/FiltersApi.js +12 -1
  14. package/dist/api/GlobalMessagesApi.js +12 -1
  15. package/dist/api/GoalsApi.js +12 -1
  16. package/dist/api/ItemSearchApi.js +12 -1
  17. package/dist/api/LeadLabelsApi.js +12 -1
  18. package/dist/api/LeadSourcesApi.js +12 -1
  19. package/dist/api/LeadsApi.js +12 -1
  20. package/dist/api/LegacyTeamsApi.js +12 -1
  21. package/dist/api/MailboxApi.js +12 -1
  22. package/dist/api/MeetingsApi.js +12 -1
  23. package/dist/api/NoteFieldsApi.js +12 -1
  24. package/dist/api/NotesApi.js +12 -1
  25. package/dist/api/OrganizationFieldsApi.js +12 -1
  26. package/dist/api/OrganizationRelationshipsApi.js +12 -1
  27. package/dist/api/OrganizationsApi.js +12 -1
  28. package/dist/api/PermissionSetsApi.js +12 -1
  29. package/dist/api/PersonFieldsApi.js +12 -1
  30. package/dist/api/PersonsApi.js +12 -1
  31. package/dist/api/PipelinesApi.js +12 -1
  32. package/dist/api/ProductFieldsApi.js +12 -1
  33. package/dist/api/ProductsApi.js +12 -1
  34. package/dist/api/ProjectTemplatesApi.js +12 -1
  35. package/dist/api/ProjectsApi.js +12 -1
  36. package/dist/api/RecentsApi.js +12 -1
  37. package/dist/api/RolesApi.js +12 -1
  38. package/dist/api/SearchResultsApi.js +12 -1
  39. package/dist/api/StagesApi.js +12 -1
  40. package/dist/api/SubscriptionsApi.js +12 -1
  41. package/dist/api/TasksApi.js +12 -1
  42. package/dist/api/TeamsApi.js +12 -1
  43. package/dist/api/UserConnectionsApi.js +12 -1
  44. package/dist/api/UserSettingsApi.js +12 -1
  45. package/dist/api/UsersApi.js +12 -1
  46. package/dist/api/WebhooksApi.js +12 -1
  47. package/dist/index.js +63 -42
  48. package/dist/model/AddProductAttachmentDetails.js +60 -23
  49. package/dist/model/AddProductRequestBody.js +50 -14
  50. package/dist/model/AddProductRequestBodyAllOf.js +78 -0
  51. package/dist/model/BaseProduct.js +60 -1
  52. package/dist/model/BaseUser.js +10 -0
  53. package/dist/model/BaseUserMe.js +15 -0
  54. package/dist/model/BasicDealProduct.js +139 -16
  55. package/dist/model/BasicDealProductAllOf.js +235 -0
  56. package/dist/model/BillingFrequency.js +86 -0
  57. package/dist/model/BillingFrequency1.js +86 -0
  58. package/dist/model/DealProductRequestBody.js +235 -0
  59. package/dist/model/DealProductUnitDuration.js +20 -0
  60. package/dist/model/Field.js +10 -0
  61. package/dist/model/FieldTypeAsString.js +68 -0
  62. package/dist/model/FilterType.js +28 -0
  63. package/dist/model/IconKey.js +160 -0
  64. package/dist/model/LeadLabelColor.js +24 -0
  65. package/dist/model/ListPermittedUsersResponse.js +0 -19
  66. package/dist/model/MarketingStatus.js +16 -0
  67. package/dist/model/NameObject.js +78 -0
  68. package/dist/model/NewDealProduct.js +95 -43
  69. package/dist/model/NewDealProductAllOf.js +9 -12
  70. package/dist/model/NewDealProductAllOf1.js +78 -0
  71. package/dist/model/NewDealProductAllOf2.js +78 -0
  72. package/dist/model/NumberBoolean.js +8 -0
  73. package/dist/model/NumberBooleanDefault0.js +8 -0
  74. package/dist/model/NumberBooleanDefault1.js +8 -0
  75. package/dist/model/PersonListProduct.js +1 -1
  76. package/dist/model/ProductAttachmentDetails.js +60 -23
  77. package/dist/model/ProductField.js +15 -0
  78. package/dist/model/ProductFieldAllOf.js +10 -0
  79. package/dist/model/ProductListItem.js +6 -6
  80. package/dist/model/ProductRequest.js +1 -1
  81. package/dist/model/ProductWithArrayPrices.js +72 -2
  82. package/dist/model/UpdateDealProduct.js +135 -5
  83. package/dist/model/UpdateProductRequestBody.js +50 -14
  84. package/dist/model/UpdateProductResponse.js +3 -3
  85. package/dist/model/VisibleTo.js +16 -0
  86. package/package.json +1 -1
@@ -93,6 +93,14 @@ var BaseProduct = /*#__PURE__*/function () {
93
93
  obj['owner_id'] = _ApiClient["default"].convertToType(data['owner_id'], Object);
94
94
  delete data['owner_id'];
95
95
  }
96
+ if (data.hasOwnProperty('billing_frequency')) {
97
+ obj['billing_frequency'] = _ApiClient["default"].convertToType(data['billing_frequency'], 'String');
98
+ delete data['billing_frequency'];
99
+ }
100
+ if (data.hasOwnProperty('billing_frequency_cycles')) {
101
+ obj['billing_frequency_cycles'] = _ApiClient["default"].convertToType(data['billing_frequency_cycles'], 'Number');
102
+ delete data['billing_frequency_cycles'];
103
+ }
96
104
  if (Object.keys(data).length > 0) {
97
105
  Object.assign(obj, data);
98
106
  }
@@ -127,7 +135,7 @@ BaseProduct.prototype['code'] = undefined;
127
135
  BaseProduct.prototype['unit'] = undefined;
128
136
 
129
137
  /**
130
- * The ax percentage
138
+ * The tax percentage
131
139
  * @member {Number} tax
132
140
  * @default 0
133
141
  */
@@ -158,5 +166,56 @@ BaseProduct.prototype['visible_to'] = undefined;
158
166
  * @member {Object} owner_id
159
167
  */
160
168
  BaseProduct.prototype['owner_id'] = undefined;
169
+
170
+ /**
171
+ * Only available in Advanced and above plans How often a customer is billed for access to a service or product
172
+ * @member {module:model/BaseProduct.BillingFrequencyEnum} billing_frequency
173
+ * @default 'one-time'
174
+ */
175
+ BaseProduct.prototype['billing_frequency'] = 'one-time';
176
+
177
+ /**
178
+ * 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
179
+ * @member {Number} billing_frequency_cycles
180
+ */
181
+ BaseProduct.prototype['billing_frequency_cycles'] = undefined;
182
+
183
+ /**
184
+ * Allowed values for the <code>billing_frequency</code> property.
185
+ * @enum {String}
186
+ * @readonly
187
+ */
188
+ BaseProduct['BillingFrequencyEnum'] = {
189
+ /**
190
+ * value: "one-time"
191
+ * @const
192
+ */
193
+ "one-time": "one-time",
194
+ /**
195
+ * value: "annually"
196
+ * @const
197
+ */
198
+ "annually": "annually",
199
+ /**
200
+ * value: "semi-annually"
201
+ * @const
202
+ */
203
+ "semi-annually": "semi-annually",
204
+ /**
205
+ * value: "quarterly"
206
+ * @const
207
+ */
208
+ "quarterly": "quarterly",
209
+ /**
210
+ * value: "monthly"
211
+ * @const
212
+ */
213
+ "monthly": "monthly",
214
+ /**
215
+ * value: "weekly"
216
+ * @const
217
+ */
218
+ "weekly": "weekly"
219
+ };
161
220
  var _default = BaseProduct;
162
221
  exports["default"] = _default;
@@ -133,6 +133,10 @@ var BaseUser = /*#__PURE__*/function () {
133
133
  obj['is_you'] = _ApiClient["default"].convertToType(data['is_you'], 'Boolean');
134
134
  delete data['is_you'];
135
135
  }
136
+ if (data.hasOwnProperty('is_deleted')) {
137
+ obj['is_deleted'] = _ApiClient["default"].convertToType(data['is_deleted'], 'Boolean');
138
+ delete data['is_deleted'];
139
+ }
136
140
  if (Object.keys(data).length > 0) {
137
141
  Object.assign(obj, data);
138
142
  }
@@ -254,5 +258,11 @@ BaseUser.prototype['icon_url'] = undefined;
254
258
  * @member {Boolean} is_you
255
259
  */
256
260
  BaseUser.prototype['is_you'] = undefined;
261
+
262
+ /**
263
+ * Boolean that indicates whether the user is deleted from the company
264
+ * @member {Boolean} is_deleted
265
+ */
266
+ BaseUser.prototype['is_deleted'] = undefined;
257
267
  var _default = BaseUser;
258
268
  exports["default"] = _default;
@@ -142,6 +142,10 @@ var BaseUserMe = /*#__PURE__*/function () {
142
142
  obj['is_you'] = _ApiClient["default"].convertToType(data['is_you'], 'Boolean');
143
143
  delete data['is_you'];
144
144
  }
145
+ if (data.hasOwnProperty('is_deleted')) {
146
+ obj['is_deleted'] = _ApiClient["default"].convertToType(data['is_deleted'], 'Boolean');
147
+ delete data['is_deleted'];
148
+ }
145
149
  if (data.hasOwnProperty('company_id')) {
146
150
  obj['company_id'] = _ApiClient["default"].convertToType(data['company_id'], 'Number');
147
151
  delete data['company_id'];
@@ -288,6 +292,12 @@ BaseUserMe.prototype['icon_url'] = undefined;
288
292
  */
289
293
  BaseUserMe.prototype['is_you'] = undefined;
290
294
 
295
+ /**
296
+ * Boolean that indicates whether the user is deleted from the company
297
+ * @member {Boolean} is_deleted
298
+ */
299
+ BaseUserMe.prototype['is_deleted'] = undefined;
300
+
291
301
  /**
292
302
  * The user company ID
293
303
  * @member {Number} company_id
@@ -418,6 +428,11 @@ _BaseUser["default"].prototype['icon_url'] = undefined;
418
428
  * @member {Boolean} is_you
419
429
  */
420
430
  _BaseUser["default"].prototype['is_you'] = undefined;
431
+ /**
432
+ * Boolean that indicates whether the user is deleted from the company
433
+ * @member {Boolean} is_deleted
434
+ */
435
+ _BaseUser["default"].prototype['is_deleted'] = undefined;
421
436
  // Implement BaseUserMeAllOf interface:
422
437
  /**
423
438
  * The user company ID
@@ -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 _BasicDealProductAllOf = _interopRequireDefault(require("./BasicDealProductAllOf"));
12
+ var _BillingFrequency = _interopRequireDefault(require("./BillingFrequency"));
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,13 +35,18 @@ var BasicDealProduct = /*#__PURE__*/function () {
30
35
  /**
31
36
  * Constructs a new <code>BasicDealProduct</code>.
32
37
  * @alias module:model/BasicDealProduct
33
- * @param productId {Number} The ID of the product to use
34
- * @param itemPrice {Number} The price at which this product will be added to the deal
35
- * @param quantity {Number} Quantity – e.g. how many items of this product will be added to the deal
38
+ * @implements module:model/BasicDealProductAllOf
39
+ * @implements module:model/NewDealProductAllOf
40
+ * @implements module:model/NewDealProductAllOf1
41
+ * @implements module:model/NewDealProductAllOf2
36
42
  */
37
- function BasicDealProduct(productId, itemPrice, quantity) {
43
+ function BasicDealProduct() {
38
44
  (0, _classCallCheck2["default"])(this, BasicDealProduct);
39
- BasicDealProduct.initialize(this, productId, itemPrice, quantity);
45
+ _BasicDealProductAllOf["default"].initialize(this);
46
+ _NewDealProductAllOf["default"].initialize(this);
47
+ _NewDealProductAllOf2["default"].initialize(this);
48
+ _NewDealProductAllOf3["default"].initialize(this);
49
+ BasicDealProduct.initialize(this);
40
50
  }
41
51
 
42
52
  /**
@@ -46,11 +56,7 @@ var BasicDealProduct = /*#__PURE__*/function () {
46
56
  */
47
57
  (0, _createClass2["default"])(BasicDealProduct, null, [{
48
58
  key: "initialize",
49
- value: function initialize(obj, productId, itemPrice, quantity) {
50
- obj['product_id'] = productId;
51
- obj['item_price'] = itemPrice;
52
- obj['quantity'] = quantity;
53
- }
59
+ value: function initialize(obj) {}
54
60
 
55
61
  /**
56
62
  * Constructs a <code>BasicDealProduct</code> from a plain JavaScript object, optionally creating a new instance.
@@ -64,6 +70,10 @@ var BasicDealProduct = /*#__PURE__*/function () {
64
70
  value: function constructFromObject(data, obj) {
65
71
  if (data) {
66
72
  obj = obj || new BasicDealProduct();
73
+ _BasicDealProductAllOf["default"].constructFromObject(data, obj);
74
+ _NewDealProductAllOf["default"].constructFromObject(data, obj);
75
+ _NewDealProductAllOf2["default"].constructFromObject(data, obj);
76
+ _NewDealProductAllOf3["default"].constructFromObject(data, obj);
67
77
  if (data.hasOwnProperty('product_id')) {
68
78
  obj['product_id'] = _ApiClient["default"].convertToType(data['product_id'], 'Number');
69
79
  delete data['product_id'];
@@ -112,6 +122,18 @@ var BasicDealProduct = /*#__PURE__*/function () {
112
122
  obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
113
123
  delete data['enabled_flag'];
114
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
+ }
115
137
  if (Object.keys(data).length > 0) {
116
138
  Object.assign(obj, data);
117
139
  }
@@ -140,21 +162,21 @@ BasicDealProduct.prototype['item_price'] = undefined;
140
162
  BasicDealProduct.prototype['quantity'] = undefined;
141
163
 
142
164
  /**
143
- * 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
144
166
  * @member {Number} discount
145
167
  * @default 0
146
168
  */
147
169
  BasicDealProduct.prototype['discount'] = 0;
148
170
 
149
171
  /**
150
- * The type of the discount's value.
172
+ * The type of the discount's value
151
173
  * @member {module:model/BasicDealProduct.DiscountTypeEnum} discount_type
152
174
  * @default 'percentage'
153
175
  */
154
176
  BasicDealProduct.prototype['discount_type'] = 'percentage';
155
177
 
156
178
  /**
157
- * The duration of the product. If omitted, will be set to 1.
179
+ * The duration of the product. If omitted, will be set to 1
158
180
  * @member {Number} duration
159
181
  * @default 1
160
182
  */
@@ -167,7 +189,7 @@ BasicDealProduct.prototype['duration'] = 1;
167
189
  BasicDealProduct.prototype['duration_unit'] = undefined;
168
190
 
169
191
  /**
170
- * 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
171
193
  * @member {Number} product_variation_id
172
194
  */
173
195
  BasicDealProduct.prototype['product_variation_id'] = undefined;
@@ -186,18 +208,119 @@ BasicDealProduct.prototype['comments'] = undefined;
186
208
  BasicDealProduct.prototype['tax'] = 0;
187
209
 
188
210
  /**
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.
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. 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
212
  * @member {module:model/BasicDealProduct.TaxMethodEnum} tax_method
191
213
  */
192
214
  BasicDealProduct.prototype['tax_method'] = undefined;
193
215
 
194
216
  /**
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.
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
196
218
  * @member {Boolean} enabled_flag
197
219
  * @default true
198
220
  */
199
221
  BasicDealProduct.prototype['enabled_flag'] = true;
200
222
 
223
+ /**
224
+ * @member {module:model/BillingFrequency} billing_frequency
225
+ */
226
+ BasicDealProduct.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
+ BasicDealProduct.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
+ BasicDealProduct.prototype['billing_start_date'] = undefined;
239
+
240
+ // Implement BasicDealProductAllOf interface:
241
+ /**
242
+ * The ID of the product to use
243
+ * @member {Number} product_id
244
+ */
245
+ _BasicDealProductAllOf["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
+ _BasicDealProductAllOf["default"].prototype['item_price'] = undefined;
251
+ /**
252
+ * Quantity – e.g. how many items of this product will be added to the deal
253
+ * @member {Number} quantity
254
+ */
255
+ _BasicDealProductAllOf["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
+ _BasicDealProductAllOf["default"].prototype['discount'] = 0;
262
+ /**
263
+ * The type of the discount's value
264
+ * @member {module:model/BasicDealProductAllOf.DiscountTypeEnum} discount_type
265
+ * @default 'percentage'
266
+ */
267
+ _BasicDealProductAllOf["default"].prototype['discount_type'] = 'percentage';
268
+ /**
269
+ * The duration of the product. If omitted, will be set to 1
270
+ * @member {Number} duration
271
+ * @default 1
272
+ */
273
+ _BasicDealProductAllOf["default"].prototype['duration'] = 1;
274
+ /**
275
+ * The unit duration of the product
276
+ * @member {module:model/DealProductUnitDuration} duration_unit
277
+ */
278
+ _BasicDealProductAllOf["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
+ _BasicDealProductAllOf["default"].prototype['product_variation_id'] = undefined;
284
+ /**
285
+ * A textual comment associated with this product-deal attachment
286
+ * @member {String} comments
287
+ */
288
+ _BasicDealProductAllOf["default"].prototype['comments'] = undefined;
289
+ /**
290
+ * The tax percentage
291
+ * @member {Number} tax
292
+ * @default 0
293
+ */
294
+ _BasicDealProductAllOf["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. 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
297
+ * @member {module:model/BasicDealProductAllOf.TaxMethodEnum} tax_method
298
+ */
299
+ _BasicDealProductAllOf["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
+ _BasicDealProductAllOf["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
+
201
324
  /**
202
325
  * Allowed values for the <code>discount_type</code> property.
203
326
  * @enum {String}
@@ -0,0 +1,235 @@
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 _DealProductUnitDuration = _interopRequireDefault(require("./DealProductUnitDuration"));
12
+ /**
13
+ * Pipedrive API v1
14
+ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
15
+ *
16
+ * The version of the OpenAPI document: 1.0.0
17
+ *
18
+ *
19
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
20
+ * https://openapi-generator.tech
21
+ * Do not edit the class manually.
22
+ *
23
+ */
24
+ /**
25
+ * The BasicDealProductAllOf model module.
26
+ * @module model/BasicDealProductAllOf
27
+ * @version 1.0.0
28
+ */
29
+ var BasicDealProductAllOf = /*#__PURE__*/function () {
30
+ /**
31
+ * Constructs a new <code>BasicDealProductAllOf</code>.
32
+ * @alias module:model/BasicDealProductAllOf
33
+ */
34
+ function BasicDealProductAllOf() {
35
+ (0, _classCallCheck2["default"])(this, BasicDealProductAllOf);
36
+ BasicDealProductAllOf.initialize(this);
37
+ }
38
+
39
+ /**
40
+ * Initializes the fields of this object.
41
+ * This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
42
+ * Only for internal use.
43
+ */
44
+ (0, _createClass2["default"])(BasicDealProductAllOf, null, [{
45
+ key: "initialize",
46
+ value: function initialize(obj) {}
47
+
48
+ /**
49
+ * Constructs a <code>BasicDealProductAllOf</code> from a plain JavaScript object, optionally creating a new instance.
50
+ * Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
51
+ * @param {Object} data The plain JavaScript object bearing properties of interest.
52
+ * @param {module:model/BasicDealProductAllOf} obj Optional instance to populate.
53
+ * @return {module:model/BasicDealProductAllOf} The populated <code>BasicDealProductAllOf</code> instance.
54
+ */
55
+ }, {
56
+ key: "constructFromObject",
57
+ value: function constructFromObject(data, obj) {
58
+ if (data) {
59
+ obj = obj || new BasicDealProductAllOf();
60
+ if (data.hasOwnProperty('product_id')) {
61
+ obj['product_id'] = _ApiClient["default"].convertToType(data['product_id'], 'Number');
62
+ delete data['product_id'];
63
+ }
64
+ if (data.hasOwnProperty('item_price')) {
65
+ obj['item_price'] = _ApiClient["default"].convertToType(data['item_price'], 'Number');
66
+ delete data['item_price'];
67
+ }
68
+ if (data.hasOwnProperty('quantity')) {
69
+ obj['quantity'] = _ApiClient["default"].convertToType(data['quantity'], 'Number');
70
+ delete data['quantity'];
71
+ }
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'];
79
+ }
80
+ if (data.hasOwnProperty('duration')) {
81
+ obj['duration'] = _ApiClient["default"].convertToType(data['duration'], 'Number');
82
+ delete data['duration'];
83
+ }
84
+ if (data.hasOwnProperty('duration_unit')) {
85
+ obj['duration_unit'] = _ApiClient["default"].convertToType(data['duration_unit'], _DealProductUnitDuration["default"]);
86
+ delete data['duration_unit'];
87
+ }
88
+ if (data.hasOwnProperty('product_variation_id')) {
89
+ obj['product_variation_id'] = _ApiClient["default"].convertToType(data['product_variation_id'], 'Number');
90
+ delete data['product_variation_id'];
91
+ }
92
+ if (data.hasOwnProperty('comments')) {
93
+ obj['comments'] = _ApiClient["default"].convertToType(data['comments'], 'String');
94
+ delete data['comments'];
95
+ }
96
+ if (data.hasOwnProperty('tax')) {
97
+ obj['tax'] = _ApiClient["default"].convertToType(data['tax'], 'Number');
98
+ delete data['tax'];
99
+ }
100
+ if (data.hasOwnProperty('tax_method')) {
101
+ obj['tax_method'] = _ApiClient["default"].convertToType(data['tax_method'], 'String');
102
+ delete data['tax_method'];
103
+ }
104
+ if (data.hasOwnProperty('enabled_flag')) {
105
+ obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
106
+ delete data['enabled_flag'];
107
+ }
108
+ if (Object.keys(data).length > 0) {
109
+ Object.assign(obj, data);
110
+ }
111
+ }
112
+ return obj;
113
+ }
114
+ }]);
115
+ return BasicDealProductAllOf;
116
+ }();
117
+ /**
118
+ * The ID of the product to use
119
+ * @member {Number} product_id
120
+ */
121
+ BasicDealProductAllOf.prototype['product_id'] = undefined;
122
+
123
+ /**
124
+ * The price at which this product will be added to the deal
125
+ * @member {Number} item_price
126
+ */
127
+ BasicDealProductAllOf.prototype['item_price'] = undefined;
128
+
129
+ /**
130
+ * Quantity – e.g. how many items of this product will be added to the deal
131
+ * @member {Number} quantity
132
+ */
133
+ BasicDealProductAllOf.prototype['quantity'] = undefined;
134
+
135
+ /**
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
138
+ * @default 0
139
+ */
140
+ BasicDealProductAllOf.prototype['discount'] = 0;
141
+
142
+ /**
143
+ * The type of the discount's value
144
+ * @member {module:model/BasicDealProductAllOf.DiscountTypeEnum} discount_type
145
+ * @default 'percentage'
146
+ */
147
+ BasicDealProductAllOf.prototype['discount_type'] = 'percentage';
148
+
149
+ /**
150
+ * The duration of the product. If omitted, will be set to 1
151
+ * @member {Number} duration
152
+ * @default 1
153
+ */
154
+ BasicDealProductAllOf.prototype['duration'] = 1;
155
+
156
+ /**
157
+ * The unit duration of the product
158
+ * @member {module:model/DealProductUnitDuration} duration_unit
159
+ */
160
+ BasicDealProductAllOf.prototype['duration_unit'] = undefined;
161
+
162
+ /**
163
+ * The ID of the product variation to use. When omitted, no variation will be used
164
+ * @member {Number} product_variation_id
165
+ */
166
+ BasicDealProductAllOf.prototype['product_variation_id'] = undefined;
167
+
168
+ /**
169
+ * A textual comment associated with this product-deal attachment
170
+ * @member {String} comments
171
+ */
172
+ BasicDealProductAllOf.prototype['comments'] = undefined;
173
+
174
+ /**
175
+ * The tax percentage
176
+ * @member {Number} tax
177
+ * @default 0
178
+ */
179
+ BasicDealProductAllOf.prototype['tax'] = 0;
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. 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
183
+ * @member {module:model/BasicDealProductAllOf.TaxMethodEnum} tax_method
184
+ */
185
+ BasicDealProductAllOf.prototype['tax_method'] = undefined;
186
+
187
+ /**
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
189
+ * @member {Boolean} enabled_flag
190
+ * @default true
191
+ */
192
+ BasicDealProductAllOf.prototype['enabled_flag'] = true;
193
+
194
+ /**
195
+ * Allowed values for the <code>discount_type</code> property.
196
+ * @enum {String}
197
+ * @readonly
198
+ */
199
+ BasicDealProductAllOf['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
+ BasicDealProductAllOf['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
+ };
234
+ var _default = BasicDealProductAllOf;
235
+ exports["default"] = _default;