pipedrive 22.6.0 → 22.7.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +9 -6
- package/dist/ApiClient.js +8 -4
- package/dist/api/ActivitiesApi.js +12 -1
- package/dist/api/ActivityFieldsApi.js +12 -1
- package/dist/api/ActivityTypesApi.js +12 -1
- package/dist/api/BillingApi.js +12 -1
- package/dist/api/CallLogsApi.js +12 -1
- package/dist/api/ChannelsApi.js +12 -1
- package/dist/api/CurrenciesApi.js +12 -1
- package/dist/api/DealFieldsApi.js +12 -1
- package/dist/api/DealsApi.js +12 -1
- package/dist/api/FilesApi.js +12 -1
- package/dist/api/FiltersApi.js +12 -1
- package/dist/api/GlobalMessagesApi.js +12 -1
- package/dist/api/GoalsApi.js +12 -1
- package/dist/api/ItemSearchApi.js +12 -1
- package/dist/api/LeadLabelsApi.js +12 -1
- package/dist/api/LeadSourcesApi.js +12 -1
- package/dist/api/LeadsApi.js +12 -1
- package/dist/api/LegacyTeamsApi.js +12 -1
- package/dist/api/MailboxApi.js +12 -1
- package/dist/api/MeetingsApi.js +12 -1
- package/dist/api/NoteFieldsApi.js +12 -1
- package/dist/api/NotesApi.js +12 -1
- package/dist/api/OrganizationFieldsApi.js +12 -1
- package/dist/api/OrganizationRelationshipsApi.js +12 -1
- package/dist/api/OrganizationsApi.js +12 -1
- package/dist/api/PermissionSetsApi.js +12 -1
- package/dist/api/PersonFieldsApi.js +12 -1
- package/dist/api/PersonsApi.js +12 -1
- package/dist/api/PipelinesApi.js +12 -1
- package/dist/api/ProductFieldsApi.js +12 -1
- package/dist/api/ProductsApi.js +12 -1
- package/dist/api/ProjectTemplatesApi.js +12 -1
- package/dist/api/ProjectsApi.js +12 -1
- package/dist/api/RecentsApi.js +12 -1
- package/dist/api/RolesApi.js +12 -1
- package/dist/api/SearchResultsApi.js +12 -1
- package/dist/api/StagesApi.js +12 -1
- package/dist/api/SubscriptionsApi.js +12 -1
- package/dist/api/TasksApi.js +12 -1
- package/dist/api/TeamsApi.js +12 -1
- package/dist/api/UserConnectionsApi.js +12 -1
- package/dist/api/UserSettingsApi.js +12 -1
- package/dist/api/UsersApi.js +12 -1
- package/dist/api/WebhooksApi.js +12 -1
- package/dist/index.js +63 -42
- package/dist/model/AddProductAttachmentDetails.js +60 -23
- package/dist/model/AddProductRequestBody.js +50 -14
- package/dist/model/AddProductRequestBodyAllOf.js +78 -0
- package/dist/model/BaseProduct.js +60 -1
- package/dist/model/BaseUser.js +10 -0
- package/dist/model/BaseUserMe.js +15 -0
- package/dist/model/BasicDealProduct.js +139 -16
- package/dist/model/BasicDealProductAllOf.js +235 -0
- package/dist/model/BillingFrequency.js +86 -0
- package/dist/model/BillingFrequency1.js +86 -0
- package/dist/model/DealProductRequestBody.js +235 -0
- package/dist/model/DealProductUnitDuration.js +20 -0
- package/dist/model/Field.js +10 -0
- package/dist/model/FieldTypeAsString.js +68 -0
- package/dist/model/FilterType.js +28 -0
- package/dist/model/IconKey.js +160 -0
- package/dist/model/LeadLabelColor.js +24 -0
- package/dist/model/ListPermittedUsersResponse.js +0 -19
- package/dist/model/MarketingStatus.js +16 -0
- package/dist/model/NameObject.js +78 -0
- package/dist/model/NewDealProduct.js +95 -43
- package/dist/model/NewDealProductAllOf.js +9 -12
- package/dist/model/NewDealProductAllOf1.js +78 -0
- package/dist/model/NewDealProductAllOf2.js +78 -0
- package/dist/model/NumberBoolean.js +8 -0
- package/dist/model/NumberBooleanDefault0.js +8 -0
- package/dist/model/NumberBooleanDefault1.js +8 -0
- package/dist/model/PersonListProduct.js +1 -1
- package/dist/model/ProductAttachmentDetails.js +60 -23
- package/dist/model/ProductField.js +15 -0
- package/dist/model/ProductFieldAllOf.js +10 -0
- package/dist/model/ProductListItem.js +6 -6
- package/dist/model/ProductRequest.js +1 -1
- package/dist/model/ProductWithArrayPrices.js +72 -2
- package/dist/model/UpdateDealProduct.js +135 -5
- package/dist/model/UpdateProductRequestBody.js +50 -14
- package/dist/model/UpdateProductResponse.js +3 -3
- package/dist/model/VisibleTo.js +16 -0
- package/package.json +1 -1
package/dist/model/IconKey.js
CHANGED
@@ -70,6 +70,166 @@ var IconKey = /*#__PURE__*/function () {
|
|
70
70
|
(0, _defineProperty2["default"])(this, "bell", "bell");
|
71
71
|
(0, _defineProperty2["default"])(this, "presentation", "presentation");
|
72
72
|
}
|
73
|
+
/**
|
74
|
+
* value: "task"
|
75
|
+
* @const
|
76
|
+
*/
|
77
|
+
/**
|
78
|
+
* value: "email"
|
79
|
+
* @const
|
80
|
+
*/
|
81
|
+
/**
|
82
|
+
* value: "meeting"
|
83
|
+
* @const
|
84
|
+
*/
|
85
|
+
/**
|
86
|
+
* value: "deadline"
|
87
|
+
* @const
|
88
|
+
*/
|
89
|
+
/**
|
90
|
+
* value: "call"
|
91
|
+
* @const
|
92
|
+
*/
|
93
|
+
/**
|
94
|
+
* value: "lunch"
|
95
|
+
* @const
|
96
|
+
*/
|
97
|
+
/**
|
98
|
+
* value: "calendar"
|
99
|
+
* @const
|
100
|
+
*/
|
101
|
+
/**
|
102
|
+
* value: "downarrow"
|
103
|
+
* @const
|
104
|
+
*/
|
105
|
+
/**
|
106
|
+
* value: "document"
|
107
|
+
* @const
|
108
|
+
*/
|
109
|
+
/**
|
110
|
+
* value: "smartphone"
|
111
|
+
* @const
|
112
|
+
*/
|
113
|
+
/**
|
114
|
+
* value: "camera"
|
115
|
+
* @const
|
116
|
+
*/
|
117
|
+
/**
|
118
|
+
* value: "scissors"
|
119
|
+
* @const
|
120
|
+
*/
|
121
|
+
/**
|
122
|
+
* value: "cogs"
|
123
|
+
* @const
|
124
|
+
*/
|
125
|
+
/**
|
126
|
+
* value: "bubble"
|
127
|
+
* @const
|
128
|
+
*/
|
129
|
+
/**
|
130
|
+
* value: "uparrow"
|
131
|
+
* @const
|
132
|
+
*/
|
133
|
+
/**
|
134
|
+
* value: "checkbox"
|
135
|
+
* @const
|
136
|
+
*/
|
137
|
+
/**
|
138
|
+
* value: "signpost"
|
139
|
+
* @const
|
140
|
+
*/
|
141
|
+
/**
|
142
|
+
* value: "shuffle"
|
143
|
+
* @const
|
144
|
+
*/
|
145
|
+
/**
|
146
|
+
* value: "addressbook"
|
147
|
+
* @const
|
148
|
+
*/
|
149
|
+
/**
|
150
|
+
* value: "linegraph"
|
151
|
+
* @const
|
152
|
+
*/
|
153
|
+
/**
|
154
|
+
* value: "picture"
|
155
|
+
* @const
|
156
|
+
*/
|
157
|
+
/**
|
158
|
+
* value: "car"
|
159
|
+
* @const
|
160
|
+
*/
|
161
|
+
/**
|
162
|
+
* value: "world"
|
163
|
+
* @const
|
164
|
+
*/
|
165
|
+
/**
|
166
|
+
* value: "search"
|
167
|
+
* @const
|
168
|
+
*/
|
169
|
+
/**
|
170
|
+
* value: "clip"
|
171
|
+
* @const
|
172
|
+
*/
|
173
|
+
/**
|
174
|
+
* value: "sound"
|
175
|
+
* @const
|
176
|
+
*/
|
177
|
+
/**
|
178
|
+
* value: "brush"
|
179
|
+
* @const
|
180
|
+
*/
|
181
|
+
/**
|
182
|
+
* value: "key"
|
183
|
+
* @const
|
184
|
+
*/
|
185
|
+
/**
|
186
|
+
* value: "padlock"
|
187
|
+
* @const
|
188
|
+
*/
|
189
|
+
/**
|
190
|
+
* value: "pricetag"
|
191
|
+
* @const
|
192
|
+
*/
|
193
|
+
/**
|
194
|
+
* value: "suitcase"
|
195
|
+
* @const
|
196
|
+
*/
|
197
|
+
/**
|
198
|
+
* value: "finish"
|
199
|
+
* @const
|
200
|
+
*/
|
201
|
+
/**
|
202
|
+
* value: "plane"
|
203
|
+
* @const
|
204
|
+
*/
|
205
|
+
/**
|
206
|
+
* value: "loop"
|
207
|
+
* @const
|
208
|
+
*/
|
209
|
+
/**
|
210
|
+
* value: "wifi"
|
211
|
+
* @const
|
212
|
+
*/
|
213
|
+
/**
|
214
|
+
* value: "truck"
|
215
|
+
* @const
|
216
|
+
*/
|
217
|
+
/**
|
218
|
+
* value: "cart"
|
219
|
+
* @const
|
220
|
+
*/
|
221
|
+
/**
|
222
|
+
* value: "bulb"
|
223
|
+
* @const
|
224
|
+
*/
|
225
|
+
/**
|
226
|
+
* value: "bell"
|
227
|
+
* @const
|
228
|
+
*/
|
229
|
+
/**
|
230
|
+
* value: "presentation"
|
231
|
+
* @const
|
232
|
+
*/
|
73
233
|
(0, _createClass2["default"])(IconKey, null, [{
|
74
234
|
key: "constructFromObject",
|
75
235
|
value:
|
@@ -36,6 +36,30 @@ var LeadLabelColor = /*#__PURE__*/function () {
|
|
36
36
|
(0, _defineProperty2["default"])(this, "purple", "purple");
|
37
37
|
(0, _defineProperty2["default"])(this, "gray", "gray");
|
38
38
|
}
|
39
|
+
/**
|
40
|
+
* value: "green"
|
41
|
+
* @const
|
42
|
+
*/
|
43
|
+
/**
|
44
|
+
* value: "blue"
|
45
|
+
* @const
|
46
|
+
*/
|
47
|
+
/**
|
48
|
+
* value: "red"
|
49
|
+
* @const
|
50
|
+
*/
|
51
|
+
/**
|
52
|
+
* value: "yellow"
|
53
|
+
* @const
|
54
|
+
*/
|
55
|
+
/**
|
56
|
+
* value: "purple"
|
57
|
+
* @const
|
58
|
+
*/
|
59
|
+
/**
|
60
|
+
* value: "gray"
|
61
|
+
* @const
|
62
|
+
*/
|
39
63
|
(0, _createClass2["default"])(LeadLabelColor, null, [{
|
40
64
|
key: "constructFromObject",
|
41
65
|
value:
|
@@ -9,8 +9,6 @@ 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 _BaseResponse = _interopRequireDefault(require("./BaseResponse"));
|
12
|
-
var _ListPermittedUsersResponseAllOf = _interopRequireDefault(require("./ListPermittedUsersResponseAllOf"));
|
13
|
-
var _ListPermittedUsersResponseAllOfData = _interopRequireDefault(require("./ListPermittedUsersResponseAllOfData"));
|
14
12
|
/**
|
15
13
|
* Pipedrive API v1
|
16
14
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
@@ -33,12 +31,10 @@ var ListPermittedUsersResponse = /*#__PURE__*/function () {
|
|
33
31
|
* Constructs a new <code>ListPermittedUsersResponse</code>.
|
34
32
|
* @alias module:model/ListPermittedUsersResponse
|
35
33
|
* @implements module:model/BaseResponse
|
36
|
-
* @implements module:model/ListPermittedUsersResponseAllOf
|
37
34
|
*/
|
38
35
|
function ListPermittedUsersResponse() {
|
39
36
|
(0, _classCallCheck2["default"])(this, ListPermittedUsersResponse);
|
40
37
|
_BaseResponse["default"].initialize(this);
|
41
|
-
_ListPermittedUsersResponseAllOf["default"].initialize(this);
|
42
38
|
ListPermittedUsersResponse.initialize(this);
|
43
39
|
}
|
44
40
|
|
@@ -64,15 +60,10 @@ var ListPermittedUsersResponse = /*#__PURE__*/function () {
|
|
64
60
|
if (data) {
|
65
61
|
obj = obj || new ListPermittedUsersResponse();
|
66
62
|
_BaseResponse["default"].constructFromObject(data, obj);
|
67
|
-
_ListPermittedUsersResponseAllOf["default"].constructFromObject(data, obj);
|
68
63
|
if (data.hasOwnProperty('success')) {
|
69
64
|
obj['success'] = _ApiClient["default"].convertToType(data['success'], 'Boolean');
|
70
65
|
delete data['success'];
|
71
66
|
}
|
72
|
-
if (data.hasOwnProperty('data')) {
|
73
|
-
obj['data'] = _ListPermittedUsersResponseAllOfData["default"].constructFromObject(data['data']);
|
74
|
-
delete data['data'];
|
75
|
-
}
|
76
67
|
if (Object.keys(data).length > 0) {
|
77
68
|
Object.assign(obj, data);
|
78
69
|
}
|
@@ -88,21 +79,11 @@ var ListPermittedUsersResponse = /*#__PURE__*/function () {
|
|
88
79
|
*/
|
89
80
|
ListPermittedUsersResponse.prototype['success'] = undefined;
|
90
81
|
|
91
|
-
/**
|
92
|
-
* @member {module:model/ListPermittedUsersResponseAllOfData} data
|
93
|
-
*/
|
94
|
-
ListPermittedUsersResponse.prototype['data'] = undefined;
|
95
|
-
|
96
82
|
// Implement BaseResponse interface:
|
97
83
|
/**
|
98
84
|
* If the response is successful or not
|
99
85
|
* @member {Boolean} success
|
100
86
|
*/
|
101
87
|
_BaseResponse["default"].prototype['success'] = undefined;
|
102
|
-
// Implement ListPermittedUsersResponseAllOf interface:
|
103
|
-
/**
|
104
|
-
* @member {module:model/ListPermittedUsersResponseAllOfData} data
|
105
|
-
*/
|
106
|
-
_ListPermittedUsersResponseAllOf["default"].prototype['data'] = undefined;
|
107
88
|
var _default = ListPermittedUsersResponse;
|
108
89
|
exports["default"] = _default;
|
@@ -34,6 +34,22 @@ var MarketingStatus = /*#__PURE__*/function () {
|
|
34
34
|
(0, _defineProperty2["default"])(this, "subscribed", "subscribed");
|
35
35
|
(0, _defineProperty2["default"])(this, "archived", "archived");
|
36
36
|
}
|
37
|
+
/**
|
38
|
+
* value: "no_consent"
|
39
|
+
* @const
|
40
|
+
*/
|
41
|
+
/**
|
42
|
+
* value: "unsubscribed"
|
43
|
+
* @const
|
44
|
+
*/
|
45
|
+
/**
|
46
|
+
* value: "subscribed"
|
47
|
+
* @const
|
48
|
+
*/
|
49
|
+
/**
|
50
|
+
* value: "archived"
|
51
|
+
* @const
|
52
|
+
*/
|
37
53
|
(0, _createClass2["default"])(MarketingStatus, null, [{
|
38
54
|
key: "constructFromObject",
|
39
55
|
value:
|
@@ -0,0 +1,78 @@
|
|
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
|
+
/**
|
12
|
+
* Pipedrive API v1
|
13
|
+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
14
|
+
*
|
15
|
+
* The version of the OpenAPI document: 1.0.0
|
16
|
+
*
|
17
|
+
*
|
18
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
19
|
+
* https://openapi-generator.tech
|
20
|
+
* Do not edit the class manually.
|
21
|
+
*
|
22
|
+
*/
|
23
|
+
/**
|
24
|
+
* The NameObject model module.
|
25
|
+
* @module model/NameObject
|
26
|
+
* @version 1.0.0
|
27
|
+
*/
|
28
|
+
var NameObject = /*#__PURE__*/function () {
|
29
|
+
/**
|
30
|
+
* Constructs a new <code>NameObject</code>.
|
31
|
+
* @alias module:model/NameObject
|
32
|
+
*/
|
33
|
+
function NameObject() {
|
34
|
+
(0, _classCallCheck2["default"])(this, NameObject);
|
35
|
+
NameObject.initialize(this);
|
36
|
+
}
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Initializes the fields of this object.
|
40
|
+
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
41
|
+
* Only for internal use.
|
42
|
+
*/
|
43
|
+
(0, _createClass2["default"])(NameObject, null, [{
|
44
|
+
key: "initialize",
|
45
|
+
value: function initialize(obj) {}
|
46
|
+
|
47
|
+
/**
|
48
|
+
* Constructs a <code>NameObject</code> from a plain JavaScript object, optionally creating a new instance.
|
49
|
+
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
50
|
+
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
51
|
+
* @param {module:model/NameObject} obj Optional instance to populate.
|
52
|
+
* @return {module:model/NameObject} The populated <code>NameObject</code> instance.
|
53
|
+
*/
|
54
|
+
}, {
|
55
|
+
key: "constructFromObject",
|
56
|
+
value: function constructFromObject(data, obj) {
|
57
|
+
if (data) {
|
58
|
+
obj = obj || new NameObject();
|
59
|
+
if (data.hasOwnProperty('name')) {
|
60
|
+
obj['name'] = _ApiClient["default"].convertToType(data['name'], 'String');
|
61
|
+
delete data['name'];
|
62
|
+
}
|
63
|
+
if (Object.keys(data).length > 0) {
|
64
|
+
Object.assign(obj, data);
|
65
|
+
}
|
66
|
+
}
|
67
|
+
return obj;
|
68
|
+
}
|
69
|
+
}]);
|
70
|
+
return NameObject;
|
71
|
+
}();
|
72
|
+
/**
|
73
|
+
* The name of the product
|
74
|
+
* @member {String} name
|
75
|
+
*/
|
76
|
+
NameObject.prototype['name'] = undefined;
|
77
|
+
var _default = NameObject;
|
78
|
+
exports["default"] = _default;
|
@@ -8,8 +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
|
11
|
+
var _BillingFrequency = _interopRequireDefault(require("./BillingFrequency"));
|
12
|
+
var _DealProductRequestBody = _interopRequireDefault(require("./DealProductRequestBody"));
|
12
13
|
var _DealProductUnitDuration = _interopRequireDefault(require("./DealProductUnitDuration"));
|
14
|
+
var _NewDealProductAllOf = _interopRequireDefault(require("./NewDealProductAllOf"));
|
15
|
+
var _NewDealProductAllOf2 = _interopRequireDefault(require("./NewDealProductAllOf1"));
|
16
|
+
var _NewDealProductAllOf3 = _interopRequireDefault(require("./NewDealProductAllOf2"));
|
13
17
|
/**
|
14
18
|
* Pipedrive API v1
|
15
19
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
@@ -31,15 +35,18 @@ var NewDealProduct = /*#__PURE__*/function () {
|
|
31
35
|
/**
|
32
36
|
* Constructs a new <code>NewDealProduct</code>.
|
33
37
|
* @alias module:model/NewDealProduct
|
34
|
-
* @implements module:model/
|
35
|
-
* @
|
36
|
-
* @
|
37
|
-
* @
|
38
|
+
* @implements module:model/DealProductRequestBody
|
39
|
+
* @implements module:model/NewDealProductAllOf
|
40
|
+
* @implements module:model/NewDealProductAllOf1
|
41
|
+
* @implements module:model/NewDealProductAllOf2
|
38
42
|
*/
|
39
|
-
function NewDealProduct(
|
43
|
+
function NewDealProduct() {
|
40
44
|
(0, _classCallCheck2["default"])(this, NewDealProduct);
|
41
|
-
|
42
|
-
|
45
|
+
_DealProductRequestBody["default"].initialize(this);
|
46
|
+
_NewDealProductAllOf["default"].initialize(this);
|
47
|
+
_NewDealProductAllOf2["default"].initialize(this);
|
48
|
+
_NewDealProductAllOf3["default"].initialize(this);
|
49
|
+
NewDealProduct.initialize(this);
|
43
50
|
}
|
44
51
|
|
45
52
|
/**
|
@@ -49,11 +56,7 @@ var NewDealProduct = /*#__PURE__*/function () {
|
|
49
56
|
*/
|
50
57
|
(0, _createClass2["default"])(NewDealProduct, null, [{
|
51
58
|
key: "initialize",
|
52
|
-
value: function initialize(obj
|
53
|
-
obj['product_id'] = productId;
|
54
|
-
obj['item_price'] = itemPrice;
|
55
|
-
obj['quantity'] = quantity;
|
56
|
-
}
|
59
|
+
value: function initialize(obj) {}
|
57
60
|
|
58
61
|
/**
|
59
62
|
* Constructs a <code>NewDealProduct</code> from a plain JavaScript object, optionally creating a new instance.
|
@@ -67,7 +70,10 @@ var NewDealProduct = /*#__PURE__*/function () {
|
|
67
70
|
value: function constructFromObject(data, obj) {
|
68
71
|
if (data) {
|
69
72
|
obj = obj || new NewDealProduct();
|
70
|
-
|
73
|
+
_DealProductRequestBody["default"].constructFromObject(data, obj);
|
74
|
+
_NewDealProductAllOf["default"].constructFromObject(data, obj);
|
75
|
+
_NewDealProductAllOf2["default"].constructFromObject(data, obj);
|
76
|
+
_NewDealProductAllOf3["default"].constructFromObject(data, obj);
|
71
77
|
if (data.hasOwnProperty('product_id')) {
|
72
78
|
obj['product_id'] = _ApiClient["default"].convertToType(data['product_id'], 'Number');
|
73
79
|
delete data['product_id'];
|
@@ -116,6 +122,18 @@ var NewDealProduct = /*#__PURE__*/function () {
|
|
116
122
|
obj['enabled_flag'] = _ApiClient["default"].convertToType(data['enabled_flag'], 'Boolean');
|
117
123
|
delete data['enabled_flag'];
|
118
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
|
+
}
|
119
137
|
if (Object.keys(data).length > 0) {
|
120
138
|
Object.assign(obj, data);
|
121
139
|
}
|
@@ -138,27 +156,27 @@ NewDealProduct.prototype['product_id'] = undefined;
|
|
138
156
|
NewDealProduct.prototype['item_price'] = undefined;
|
139
157
|
|
140
158
|
/**
|
141
|
-
*
|
159
|
+
* How many items of this product will be added to the deal
|
142
160
|
* @member {Number} quantity
|
143
161
|
*/
|
144
162
|
NewDealProduct.prototype['quantity'] = undefined;
|
145
163
|
|
146
164
|
/**
|
147
|
-
* 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
|
148
166
|
* @member {Number} discount
|
149
167
|
* @default 0
|
150
168
|
*/
|
151
169
|
NewDealProduct.prototype['discount'] = 0;
|
152
170
|
|
153
171
|
/**
|
154
|
-
* The type of the discount's value
|
172
|
+
* The type of the discount's value
|
155
173
|
* @member {module:model/NewDealProduct.DiscountTypeEnum} discount_type
|
156
174
|
* @default 'percentage'
|
157
175
|
*/
|
158
176
|
NewDealProduct.prototype['discount_type'] = 'percentage';
|
159
177
|
|
160
178
|
/**
|
161
|
-
* The duration of the product
|
179
|
+
* The duration of the product
|
162
180
|
* @member {Number} duration
|
163
181
|
* @default 1
|
164
182
|
*/
|
@@ -171,7 +189,7 @@ NewDealProduct.prototype['duration'] = 1;
|
|
171
189
|
NewDealProduct.prototype['duration_unit'] = undefined;
|
172
190
|
|
173
191
|
/**
|
174
|
-
* 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
|
175
193
|
* @member {Number} product_variation_id
|
176
194
|
*/
|
177
195
|
NewDealProduct.prototype['product_variation_id'] = undefined;
|
@@ -190,84 +208,118 @@ NewDealProduct.prototype['comments'] = undefined;
|
|
190
208
|
NewDealProduct.prototype['tax'] = 0;
|
191
209
|
|
192
210
|
/**
|
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
|
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
|
194
212
|
* @member {module:model/NewDealProduct.TaxMethodEnum} tax_method
|
195
213
|
*/
|
196
214
|
NewDealProduct.prototype['tax_method'] = undefined;
|
197
215
|
|
198
216
|
/**
|
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
|
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
|
200
218
|
* @member {Boolean} enabled_flag
|
201
219
|
* @default true
|
202
220
|
*/
|
203
221
|
NewDealProduct.prototype['enabled_flag'] = true;
|
204
222
|
|
205
|
-
|
223
|
+
/**
|
224
|
+
* @member {module:model/BillingFrequency} billing_frequency
|
225
|
+
*/
|
226
|
+
NewDealProduct.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
|
+
NewDealProduct.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
|
+
NewDealProduct.prototype['billing_start_date'] = undefined;
|
239
|
+
|
240
|
+
// Implement DealProductRequestBody interface:
|
206
241
|
/**
|
207
242
|
* The ID of the product to use
|
208
243
|
* @member {Number} product_id
|
209
244
|
*/
|
210
|
-
|
245
|
+
_DealProductRequestBody["default"].prototype['product_id'] = undefined;
|
211
246
|
/**
|
212
247
|
* The price at which this product will be added to the deal
|
213
248
|
* @member {Number} item_price
|
214
249
|
*/
|
215
|
-
|
250
|
+
_DealProductRequestBody["default"].prototype['item_price'] = undefined;
|
216
251
|
/**
|
217
|
-
*
|
252
|
+
* How many items of this product will be added to the deal
|
218
253
|
* @member {Number} quantity
|
219
254
|
*/
|
220
|
-
|
255
|
+
_DealProductRequestBody["default"].prototype['quantity'] = undefined;
|
221
256
|
/**
|
222
|
-
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage
|
257
|
+
* The value of the discount. The `discount_type` field can be used to specify whether the value is an amount or a percentage
|
223
258
|
* @member {Number} discount
|
224
259
|
* @default 0
|
225
260
|
*/
|
226
|
-
|
261
|
+
_DealProductRequestBody["default"].prototype['discount'] = 0;
|
227
262
|
/**
|
228
|
-
* The type of the discount's value
|
229
|
-
* @member {module:model/
|
263
|
+
* The type of the discount's value
|
264
|
+
* @member {module:model/DealProductRequestBody.DiscountTypeEnum} discount_type
|
230
265
|
* @default 'percentage'
|
231
266
|
*/
|
232
|
-
|
267
|
+
_DealProductRequestBody["default"].prototype['discount_type'] = 'percentage';
|
233
268
|
/**
|
234
|
-
* The duration of the product
|
269
|
+
* The duration of the product
|
235
270
|
* @member {Number} duration
|
236
271
|
* @default 1
|
237
272
|
*/
|
238
|
-
|
273
|
+
_DealProductRequestBody["default"].prototype['duration'] = 1;
|
239
274
|
/**
|
240
275
|
* The unit duration of the product
|
241
276
|
* @member {module:model/DealProductUnitDuration} duration_unit
|
242
277
|
*/
|
243
|
-
|
278
|
+
_DealProductRequestBody["default"].prototype['duration_unit'] = undefined;
|
244
279
|
/**
|
245
|
-
* The ID of the product variation to use. When omitted, no variation will be used
|
280
|
+
* The ID of the product variation to use. When omitted, no variation will be used
|
246
281
|
* @member {Number} product_variation_id
|
247
282
|
*/
|
248
|
-
|
283
|
+
_DealProductRequestBody["default"].prototype['product_variation_id'] = undefined;
|
249
284
|
/**
|
250
285
|
* A textual comment associated with this product-deal attachment
|
251
286
|
* @member {String} comments
|
252
287
|
*/
|
253
|
-
|
288
|
+
_DealProductRequestBody["default"].prototype['comments'] = undefined;
|
254
289
|
/**
|
255
290
|
* The tax percentage
|
256
291
|
* @member {Number} tax
|
257
292
|
* @default 0
|
258
293
|
*/
|
259
|
-
|
294
|
+
_DealProductRequestBody["default"].prototype['tax'] = 0;
|
260
295
|
/**
|
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
|
262
|
-
* @member {module:model/
|
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
|
263
298
|
*/
|
264
|
-
|
299
|
+
_DealProductRequestBody["default"].prototype['tax_method'] = undefined;
|
265
300
|
/**
|
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
|
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
|
267
302
|
* @member {Boolean} enabled_flag
|
268
303
|
* @default true
|
269
304
|
*/
|
270
|
-
|
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;
|
271
323
|
|
272
324
|
/**
|
273
325
|
* Allowed values for the <code>discount_type</code> property.
|