ultracart_rest_api_v2_typescript 4.0.101-RC → 4.0.103-RC

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -225,8 +225,12 @@ src/models/CouponFreeShippingWithItemsPurchase.ts
225
225
  src/models/CouponFreeShippingWithSubtotal.ts
226
226
  src/models/CouponItemSearchResult.ts
227
227
  src/models/CouponItemSearchResultsResponse.ts
228
+ src/models/CouponMoreLoyaltyCashback.ts
229
+ src/models/CouponMoreLoyaltyPoints.ts
228
230
  src/models/CouponMultipleAmountsOffItems.ts
229
231
  src/models/CouponNoDiscount.ts
232
+ src/models/CouponPercentMoreLoyaltyCashback.ts
233
+ src/models/CouponPercentMoreLoyaltyPoints.ts
230
234
  src/models/CouponPercentOffItemWithItemsQuantityPurchase.ts
231
235
  src/models/CouponPercentOffItems.ts
232
236
  src/models/CouponPercentOffItemsAndFreeShipping.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@4.0.101-RC
1
+ ## ultracart_rest_api_v2_typescript@4.0.103-RC
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install ultracart_rest_api_v2_typescript@4.0.101-RC --save
39
+ npm install ultracart_rest_api_v2_typescript@4.0.103-RC --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -54,6 +54,8 @@ Not every change is committed to every SDK.
54
54
 
55
55
  | Version | Date | Comments |
56
56
  | --: | :-: | --- |
57
+ | 4.0.103-RC | 12/27/2022 | additional loyalty related coupons |
58
+ | 4.0.102-RC | 12/21/2022 | conversation development |
57
59
  | 4.0.101-RC | 12/20/2022 | conversation engagement update |
58
60
  | 4.0.100-RC | 12/20/2022 | conversation engagement update |
59
61
  | 4.0.99-RC | 12/15/2022 | conversation search - added start date filtering |
@@ -11,6 +11,15 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import { ConversationAgentAuthResponse, ConversationAutocompleteRequest, ConversationAutocompleteResponse, ConversationCannedMessage, ConversationCannedMessageResponse, ConversationCannedMessagesResponse, ConversationCannedMessagesSearch, ConversationDepartment, ConversationDepartmentResponse, ConversationDepartmentsResponse, ConversationEngagement, ConversationEngagementResponse, ConversationEngagementsResponse, ConversationJoinRequest, ConversationMessagesResponse, ConversationMultimediaUploadUrlResponse, ConversationResponse, ConversationSearchRequest, ConversationSearchResponse, ConversationStartRequest, ConversationStartResponse, ConversationWebchatContext, ConversationWebchatQueueStatusUpdateRequest, ConversationWebchatQueueStatusesResponse, ConversationsResponse } from '../models';
14
+ export interface DeleteConversationCannedMessageRequest {
15
+ conversationCannedMessageOid: number;
16
+ }
17
+ export interface DeleteDepartmentRequest {
18
+ conversationDepartmentOid: number;
19
+ }
20
+ export interface DeleteEngagementRequest {
21
+ conversationEngagementOid: number;
22
+ }
14
23
  export interface GetConversationRequest {
15
24
  conversationUuid: string;
16
25
  limit?: number;
@@ -86,6 +95,48 @@ export interface UpdateConversationWebchatQueueStatusRequest {
86
95
  * @interface ConversationApiInterface
87
96
  */
88
97
  export interface ConversationApiInterface {
98
+ /**
99
+ * Delete a conversation canned message
100
+ * @summary Delete a conversation canned message
101
+ * @param {number} conversationCannedMessageOid
102
+ * @param {*} [options] Override http request option.
103
+ * @throws {RequiredError}
104
+ * @memberof ConversationApiInterface
105
+ */
106
+ deleteConversationCannedMessageRaw(requestParameters: DeleteConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
107
+ /**
108
+ * Delete a conversation canned message
109
+ * Delete a conversation canned message
110
+ */
111
+ deleteConversationCannedMessage(requestParameters: DeleteConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
112
+ /**
113
+ * Delete a conversation department
114
+ * @summary Delete a conversation department
115
+ * @param {number} conversationDepartmentOid
116
+ * @param {*} [options] Override http request option.
117
+ * @throws {RequiredError}
118
+ * @memberof ConversationApiInterface
119
+ */
120
+ deleteDepartmentRaw(requestParameters: DeleteDepartmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
121
+ /**
122
+ * Delete a conversation department
123
+ * Delete a conversation department
124
+ */
125
+ deleteDepartment(requestParameters: DeleteDepartmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
126
+ /**
127
+ * Delete a conversation engagement
128
+ * @summary Delete a conversation engagement
129
+ * @param {number} conversationEngagementOid
130
+ * @param {*} [options] Override http request option.
131
+ * @throws {RequiredError}
132
+ * @memberof ConversationApiInterface
133
+ */
134
+ deleteEngagementRaw(requestParameters: DeleteEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
135
+ /**
136
+ * Delete a conversation engagement
137
+ * Delete a conversation engagement
138
+ */
139
+ deleteEngagement(requestParameters: DeleteEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
89
140
  /**
90
141
  * Called periodically by the conversation API to keep the session alive.
91
142
  * @summary Agent keep alive
@@ -446,6 +497,36 @@ export interface ConversationApiInterface {
446
497
  *
447
498
  */
448
499
  export declare class ConversationApi extends runtime.BaseAPI implements ConversationApiInterface {
500
+ /**
501
+ * Delete a conversation canned message
502
+ * Delete a conversation canned message
503
+ */
504
+ deleteConversationCannedMessageRaw(requestParameters: DeleteConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
505
+ /**
506
+ * Delete a conversation canned message
507
+ * Delete a conversation canned message
508
+ */
509
+ deleteConversationCannedMessage(requestParameters: DeleteConversationCannedMessageRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
510
+ /**
511
+ * Delete a conversation department
512
+ * Delete a conversation department
513
+ */
514
+ deleteDepartmentRaw(requestParameters: DeleteDepartmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
515
+ /**
516
+ * Delete a conversation department
517
+ * Delete a conversation department
518
+ */
519
+ deleteDepartment(requestParameters: DeleteDepartmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
520
+ /**
521
+ * Delete a conversation engagement
522
+ * Delete a conversation engagement
523
+ */
524
+ deleteEngagementRaw(requestParameters: DeleteEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
525
+ /**
526
+ * Delete a conversation engagement
527
+ * Delete a conversation engagement
528
+ */
529
+ deleteEngagement(requestParameters: DeleteEngagementRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
449
530
  /**
450
531
  * Called periodically by the conversation API to keep the session alive.
451
532
  * Agent keep alive
@@ -75,6 +75,177 @@ var ConversationApi = /** @class */ (function (_super) {
75
75
  function ConversationApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ * Delete a conversation canned message
80
+ * Delete a conversation canned message
81
+ */
82
+ ConversationApi.prototype.deleteConversationCannedMessageRaw = function (requestParameters, initOverrides) {
83
+ return __awaiter(this, void 0, void 0, function () {
84
+ var queryParameters, headerParameters, _a, _b, response;
85
+ return __generator(this, function (_c) {
86
+ switch (_c.label) {
87
+ case 0:
88
+ if (requestParameters.conversationCannedMessageOid === null || requestParameters.conversationCannedMessageOid === undefined) {
89
+ throw new runtime.RequiredError('conversationCannedMessageOid', 'Required parameter requestParameters.conversationCannedMessageOid was null or undefined when calling deleteConversationCannedMessage.');
90
+ }
91
+ queryParameters = {};
92
+ headerParameters = {};
93
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
94
+ // oauth required
95
+ _a = headerParameters;
96
+ _b = "Authorization";
97
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
98
+ case 1:
99
+ // oauth required
100
+ _a[_b] = _c.sent();
101
+ _c.label = 2;
102
+ case 2:
103
+ if (this.configuration && this.configuration.apiKey) {
104
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
105
+ }
106
+ return [4 /*yield*/, this.request({
107
+ path: "/conversation/canned_messages/{conversation_canned_message_oid}".replace("{".concat("conversation_canned_message_oid", "}"), encodeURIComponent(String(requestParameters.conversationCannedMessageOid))),
108
+ method: 'DELETE',
109
+ headers: headerParameters,
110
+ query: queryParameters,
111
+ }, initOverrides)];
112
+ case 3:
113
+ response = _c.sent();
114
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
115
+ }
116
+ });
117
+ });
118
+ };
119
+ /**
120
+ * Delete a conversation canned message
121
+ * Delete a conversation canned message
122
+ */
123
+ ConversationApi.prototype.deleteConversationCannedMessage = function (requestParameters, initOverrides) {
124
+ return __awaiter(this, void 0, void 0, function () {
125
+ return __generator(this, function (_a) {
126
+ switch (_a.label) {
127
+ case 0: return [4 /*yield*/, this.deleteConversationCannedMessageRaw(requestParameters, initOverrides)];
128
+ case 1:
129
+ _a.sent();
130
+ return [2 /*return*/];
131
+ }
132
+ });
133
+ });
134
+ };
135
+ /**
136
+ * Delete a conversation department
137
+ * Delete a conversation department
138
+ */
139
+ ConversationApi.prototype.deleteDepartmentRaw = function (requestParameters, initOverrides) {
140
+ return __awaiter(this, void 0, void 0, function () {
141
+ var queryParameters, headerParameters, _a, _b, response;
142
+ return __generator(this, function (_c) {
143
+ switch (_c.label) {
144
+ case 0:
145
+ if (requestParameters.conversationDepartmentOid === null || requestParameters.conversationDepartmentOid === undefined) {
146
+ throw new runtime.RequiredError('conversationDepartmentOid', 'Required parameter requestParameters.conversationDepartmentOid was null or undefined when calling deleteDepartment.');
147
+ }
148
+ queryParameters = {};
149
+ headerParameters = {};
150
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
151
+ // oauth required
152
+ _a = headerParameters;
153
+ _b = "Authorization";
154
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
155
+ case 1:
156
+ // oauth required
157
+ _a[_b] = _c.sent();
158
+ _c.label = 2;
159
+ case 2:
160
+ if (this.configuration && this.configuration.apiKey) {
161
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
162
+ }
163
+ return [4 /*yield*/, this.request({
164
+ path: "/conversation/departments/{conversation_department_oid}".replace("{".concat("conversation_department_oid", "}"), encodeURIComponent(String(requestParameters.conversationDepartmentOid))),
165
+ method: 'DELETE',
166
+ headers: headerParameters,
167
+ query: queryParameters,
168
+ }, initOverrides)];
169
+ case 3:
170
+ response = _c.sent();
171
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
172
+ }
173
+ });
174
+ });
175
+ };
176
+ /**
177
+ * Delete a conversation department
178
+ * Delete a conversation department
179
+ */
180
+ ConversationApi.prototype.deleteDepartment = function (requestParameters, initOverrides) {
181
+ return __awaiter(this, void 0, void 0, function () {
182
+ return __generator(this, function (_a) {
183
+ switch (_a.label) {
184
+ case 0: return [4 /*yield*/, this.deleteDepartmentRaw(requestParameters, initOverrides)];
185
+ case 1:
186
+ _a.sent();
187
+ return [2 /*return*/];
188
+ }
189
+ });
190
+ });
191
+ };
192
+ /**
193
+ * Delete a conversation engagement
194
+ * Delete a conversation engagement
195
+ */
196
+ ConversationApi.prototype.deleteEngagementRaw = function (requestParameters, initOverrides) {
197
+ return __awaiter(this, void 0, void 0, function () {
198
+ var queryParameters, headerParameters, _a, _b, response;
199
+ return __generator(this, function (_c) {
200
+ switch (_c.label) {
201
+ case 0:
202
+ if (requestParameters.conversationEngagementOid === null || requestParameters.conversationEngagementOid === undefined) {
203
+ throw new runtime.RequiredError('conversationEngagementOid', 'Required parameter requestParameters.conversationEngagementOid was null or undefined when calling deleteEngagement.');
204
+ }
205
+ queryParameters = {};
206
+ headerParameters = {};
207
+ if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
208
+ // oauth required
209
+ _a = headerParameters;
210
+ _b = "Authorization";
211
+ return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
212
+ case 1:
213
+ // oauth required
214
+ _a[_b] = _c.sent();
215
+ _c.label = 2;
216
+ case 2:
217
+ if (this.configuration && this.configuration.apiKey) {
218
+ headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
219
+ }
220
+ return [4 /*yield*/, this.request({
221
+ path: "/conversation/engagements/{conversation_engagement_oid}".replace("{".concat("conversation_engagement_oid", "}"), encodeURIComponent(String(requestParameters.conversationEngagementOid))),
222
+ method: 'DELETE',
223
+ headers: headerParameters,
224
+ query: queryParameters,
225
+ }, initOverrides)];
226
+ case 3:
227
+ response = _c.sent();
228
+ return [2 /*return*/, new runtime.VoidApiResponse(response)];
229
+ }
230
+ });
231
+ });
232
+ };
233
+ /**
234
+ * Delete a conversation engagement
235
+ * Delete a conversation engagement
236
+ */
237
+ ConversationApi.prototype.deleteEngagement = function (requestParameters, initOverrides) {
238
+ return __awaiter(this, void 0, void 0, function () {
239
+ return __generator(this, function (_a) {
240
+ switch (_a.label) {
241
+ case 0: return [4 /*yield*/, this.deleteEngagementRaw(requestParameters, initOverrides)];
242
+ case 1:
243
+ _a.sent();
244
+ return [2 /*return*/];
245
+ }
246
+ });
247
+ });
248
+ };
78
249
  /**
79
250
  * Called periodically by the conversation API to keep the session alive.
80
251
  * Agent keep alive
@@ -21,12 +21,6 @@ export interface ConversationDepartment {
21
21
  * @memberof ConversationDepartment
22
22
  */
23
23
  conversation_department_oid?: number;
24
- /**
25
- *
26
- * @type {boolean}
27
- * @memberof ConversationDepartment
28
- */
29
- delete_me?: boolean;
30
24
  /**
31
25
  *
32
26
  * @type {string}
@@ -25,7 +25,6 @@ function ConversationDepartmentFromJSONTyped(json, ignoreDiscriminator) {
25
25
  }
26
26
  return {
27
27
  'conversation_department_oid': !(0, runtime_1.exists)(json, 'conversation_department_oid') ? undefined : json['conversation_department_oid'],
28
- 'delete_me': !(0, runtime_1.exists)(json, 'delete_me') ? undefined : json['delete_me'],
29
28
  'department_name': !(0, runtime_1.exists)(json, 'department_name') ? undefined : json['department_name'],
30
29
  'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
31
30
  'settings': !(0, runtime_1.exists)(json, 'settings') ? undefined : json['settings'],
@@ -41,7 +40,6 @@ function ConversationDepartmentToJSON(value) {
41
40
  }
42
41
  return {
43
42
  'conversation_department_oid': value.conversation_department_oid,
44
- 'delete_me': value.delete_me,
45
43
  'department_name': value.department_name,
46
44
  'merchant_id': value.merchant_id,
47
45
  'settings': value.settings,
@@ -16,6 +16,12 @@ import { ConversationEngagementEquation } from './ConversationEngagementEquation
16
16
  * @interface ConversationEngagement
17
17
  */
18
18
  export interface ConversationEngagement {
19
+ /**
20
+ *
21
+ * @type {boolean}
22
+ * @memberof ConversationEngagement
23
+ */
24
+ active?: boolean;
19
25
  /**
20
26
  *
21
27
  * @type {number}
@@ -33,6 +33,7 @@ function ConversationEngagementFromJSONTyped(json, ignoreDiscriminator) {
33
33
  return json;
34
34
  }
35
35
  return {
36
+ 'active': !(0, runtime_1.exists)(json, 'active') ? undefined : json['active'],
36
37
  'conversation_engagement_oid': !(0, runtime_1.exists)(json, 'conversation_engagement_oid') ? undefined : json['conversation_engagement_oid'],
37
38
  'customer_greeting': !(0, runtime_1.exists)(json, 'customer_greeting') ? undefined : json['customer_greeting'],
38
39
  'department_oids': !(0, runtime_1.exists)(json, 'department_oids') ? undefined : json['department_oids'],
@@ -51,6 +52,7 @@ function ConversationEngagementToJSON(value) {
51
52
  return null;
52
53
  }
53
54
  return {
55
+ 'active': value.active,
54
56
  'conversation_engagement_oid': value.conversation_engagement_oid,
55
57
  'customer_greeting': value.customer_greeting,
56
58
  'department_oids': value.department_oids,
@@ -32,8 +32,12 @@ import { CouponFreeShipping } from './CouponFreeShipping';
32
32
  import { CouponFreeShippingSpecificItems } from './CouponFreeShippingSpecificItems';
33
33
  import { CouponFreeShippingWithItemsPurchase } from './CouponFreeShippingWithItemsPurchase';
34
34
  import { CouponFreeShippingWithSubtotal } from './CouponFreeShippingWithSubtotal';
35
+ import { CouponMoreLoyaltyCashback } from './CouponMoreLoyaltyCashback';
36
+ import { CouponMoreLoyaltyPoints } from './CouponMoreLoyaltyPoints';
35
37
  import { CouponMultipleAmountsOffItems } from './CouponMultipleAmountsOffItems';
36
38
  import { CouponNoDiscount } from './CouponNoDiscount';
39
+ import { CouponPercentMoreLoyaltyCashback } from './CouponPercentMoreLoyaltyCashback';
40
+ import { CouponPercentMoreLoyaltyPoints } from './CouponPercentMoreLoyaltyPoints';
37
41
  import { CouponPercentOffItemWithItemsQuantityPurchase } from './CouponPercentOffItemWithItemsQuantityPurchase';
38
42
  import { CouponPercentOffItems } from './CouponPercentOffItems';
39
43
  import { CouponPercentOffItemsAndFreeShipping } from './CouponPercentOffItemsAndFreeShipping';
@@ -263,6 +267,18 @@ export interface Coupon {
263
267
  * @memberof Coupon
264
268
  */
265
269
  merchant_notes?: string;
270
+ /**
271
+ *
272
+ * @type {CouponMoreLoyaltyCashback}
273
+ * @memberof Coupon
274
+ */
275
+ more_loyalty_cashback?: CouponMoreLoyaltyCashback;
276
+ /**
277
+ *
278
+ * @type {CouponMoreLoyaltyPoints}
279
+ * @memberof Coupon
280
+ */
281
+ more_loyalty_points?: CouponMoreLoyaltyPoints;
266
282
  /**
267
283
  *
268
284
  * @type {CouponMultipleAmountsOffItems}
@@ -275,6 +291,18 @@ export interface Coupon {
275
291
  * @memberof Coupon
276
292
  */
277
293
  no_discount?: CouponNoDiscount;
294
+ /**
295
+ *
296
+ * @type {CouponPercentMoreLoyaltyCashback}
297
+ * @memberof Coupon
298
+ */
299
+ percent_more_loyalty_cashback?: CouponPercentMoreLoyaltyCashback;
300
+ /**
301
+ *
302
+ * @type {CouponPercentMoreLoyaltyPoints}
303
+ * @memberof Coupon
304
+ */
305
+ percent_more_loyalty_points?: CouponPercentMoreLoyaltyPoints;
278
306
  /**
279
307
  *
280
308
  * @type {CouponPercentOffItemWithItemsQuantityPurchase}
@@ -38,8 +38,12 @@ var CouponFreeShipping_1 = require("./CouponFreeShipping");
38
38
  var CouponFreeShippingSpecificItems_1 = require("./CouponFreeShippingSpecificItems");
39
39
  var CouponFreeShippingWithItemsPurchase_1 = require("./CouponFreeShippingWithItemsPurchase");
40
40
  var CouponFreeShippingWithSubtotal_1 = require("./CouponFreeShippingWithSubtotal");
41
+ var CouponMoreLoyaltyCashback_1 = require("./CouponMoreLoyaltyCashback");
42
+ var CouponMoreLoyaltyPoints_1 = require("./CouponMoreLoyaltyPoints");
41
43
  var CouponMultipleAmountsOffItems_1 = require("./CouponMultipleAmountsOffItems");
42
44
  var CouponNoDiscount_1 = require("./CouponNoDiscount");
45
+ var CouponPercentMoreLoyaltyCashback_1 = require("./CouponPercentMoreLoyaltyCashback");
46
+ var CouponPercentMoreLoyaltyPoints_1 = require("./CouponPercentMoreLoyaltyPoints");
43
47
  var CouponPercentOffItemWithItemsQuantityPurchase_1 = require("./CouponPercentOffItemWithItemsQuantityPurchase");
44
48
  var CouponPercentOffItems_1 = require("./CouponPercentOffItems");
45
49
  var CouponPercentOffItemsAndFreeShipping_1 = require("./CouponPercentOffItemsAndFreeShipping");
@@ -102,8 +106,12 @@ function CouponFromJSONTyped(json, ignoreDiscriminator) {
102
106
  'hide_from_customer': !(0, runtime_1.exists)(json, 'hide_from_customer') ? undefined : json['hide_from_customer'],
103
107
  'merchant_code': !(0, runtime_1.exists)(json, 'merchant_code') ? undefined : json['merchant_code'],
104
108
  'merchant_notes': !(0, runtime_1.exists)(json, 'merchant_notes') ? undefined : json['merchant_notes'],
109
+ 'more_loyalty_cashback': !(0, runtime_1.exists)(json, 'more_loyalty_cashback') ? undefined : (0, CouponMoreLoyaltyCashback_1.CouponMoreLoyaltyCashbackFromJSON)(json['more_loyalty_cashback']),
110
+ 'more_loyalty_points': !(0, runtime_1.exists)(json, 'more_loyalty_points') ? undefined : (0, CouponMoreLoyaltyPoints_1.CouponMoreLoyaltyPointsFromJSON)(json['more_loyalty_points']),
105
111
  'multiple_amounts_off_items': !(0, runtime_1.exists)(json, 'multiple_amounts_off_items') ? undefined : (0, CouponMultipleAmountsOffItems_1.CouponMultipleAmountsOffItemsFromJSON)(json['multiple_amounts_off_items']),
106
112
  'no_discount': !(0, runtime_1.exists)(json, 'no_discount') ? undefined : (0, CouponNoDiscount_1.CouponNoDiscountFromJSON)(json['no_discount']),
113
+ 'percent_more_loyalty_cashback': !(0, runtime_1.exists)(json, 'percent_more_loyalty_cashback') ? undefined : (0, CouponPercentMoreLoyaltyCashback_1.CouponPercentMoreLoyaltyCashbackFromJSON)(json['percent_more_loyalty_cashback']),
114
+ 'percent_more_loyalty_points': !(0, runtime_1.exists)(json, 'percent_more_loyalty_points') ? undefined : (0, CouponPercentMoreLoyaltyPoints_1.CouponPercentMoreLoyaltyPointsFromJSON)(json['percent_more_loyalty_points']),
107
115
  'percent_off_item_with_items_quantity_purchase': !(0, runtime_1.exists)(json, 'percent_off_item_with_items_quantity_purchase') ? undefined : (0, CouponPercentOffItemWithItemsQuantityPurchase_1.CouponPercentOffItemWithItemsQuantityPurchaseFromJSON)(json['percent_off_item_with_items_quantity_purchase']),
108
116
  'percent_off_items': !(0, runtime_1.exists)(json, 'percent_off_items') ? undefined : (0, CouponPercentOffItems_1.CouponPercentOffItemsFromJSON)(json['percent_off_items']),
109
117
  'percent_off_items_and_free_shipping': !(0, runtime_1.exists)(json, 'percent_off_items_and_free_shipping') ? undefined : (0, CouponPercentOffItemsAndFreeShipping_1.CouponPercentOffItemsAndFreeShippingFromJSON)(json['percent_off_items_and_free_shipping']),
@@ -174,8 +182,12 @@ function CouponToJSON(value) {
174
182
  'hide_from_customer': value.hide_from_customer,
175
183
  'merchant_code': value.merchant_code,
176
184
  'merchant_notes': value.merchant_notes,
185
+ 'more_loyalty_cashback': (0, CouponMoreLoyaltyCashback_1.CouponMoreLoyaltyCashbackToJSON)(value.more_loyalty_cashback),
186
+ 'more_loyalty_points': (0, CouponMoreLoyaltyPoints_1.CouponMoreLoyaltyPointsToJSON)(value.more_loyalty_points),
177
187
  'multiple_amounts_off_items': (0, CouponMultipleAmountsOffItems_1.CouponMultipleAmountsOffItemsToJSON)(value.multiple_amounts_off_items),
178
188
  'no_discount': (0, CouponNoDiscount_1.CouponNoDiscountToJSON)(value.no_discount),
189
+ 'percent_more_loyalty_cashback': (0, CouponPercentMoreLoyaltyCashback_1.CouponPercentMoreLoyaltyCashbackToJSON)(value.percent_more_loyalty_cashback),
190
+ 'percent_more_loyalty_points': (0, CouponPercentMoreLoyaltyPoints_1.CouponPercentMoreLoyaltyPointsToJSON)(value.percent_more_loyalty_points),
179
191
  'percent_off_item_with_items_quantity_purchase': (0, CouponPercentOffItemWithItemsQuantityPurchase_1.CouponPercentOffItemWithItemsQuantityPurchaseToJSON)(value.percent_off_item_with_items_quantity_purchase),
180
192
  'percent_off_items': (0, CouponPercentOffItems_1.CouponPercentOffItemsToJSON)(value.percent_off_items),
181
193
  'percent_off_items_and_free_shipping': (0, CouponPercentOffItemsAndFreeShipping_1.CouponPercentOffItemsAndFreeShippingToJSON)(value.percent_off_items_and_free_shipping),
@@ -0,0 +1,27 @@
1
+ /**
2
+ * UltraCart Rest API V2
3
+ * UltraCart REST API Version 2
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: support@ultracart.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface CouponMoreLoyaltyCashback
16
+ */
17
+ export interface CouponMoreLoyaltyCashback {
18
+ /**
19
+ * The additional loyalty cashback
20
+ * @type {number}
21
+ * @memberof CouponMoreLoyaltyCashback
22
+ */
23
+ loyalty_cashback?: number;
24
+ }
25
+ export declare function CouponMoreLoyaltyCashbackFromJSON(json: any): CouponMoreLoyaltyCashback;
26
+ export declare function CouponMoreLoyaltyCashbackFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponMoreLoyaltyCashback;
27
+ export declare function CouponMoreLoyaltyCashbackToJSON(value?: CouponMoreLoyaltyCashback | null): any;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * UltraCart Rest API V2
6
+ * UltraCart REST API Version 2
7
+ *
8
+ * The version of the OpenAPI document: 2.0.0
9
+ * Contact: support@ultracart.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.CouponMoreLoyaltyCashbackToJSON = exports.CouponMoreLoyaltyCashbackFromJSONTyped = exports.CouponMoreLoyaltyCashbackFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ function CouponMoreLoyaltyCashbackFromJSON(json) {
19
+ return CouponMoreLoyaltyCashbackFromJSONTyped(json, false);
20
+ }
21
+ exports.CouponMoreLoyaltyCashbackFromJSON = CouponMoreLoyaltyCashbackFromJSON;
22
+ function CouponMoreLoyaltyCashbackFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'loyalty_cashback': !(0, runtime_1.exists)(json, 'loyalty_cashback') ? undefined : json['loyalty_cashback'],
28
+ };
29
+ }
30
+ exports.CouponMoreLoyaltyCashbackFromJSONTyped = CouponMoreLoyaltyCashbackFromJSONTyped;
31
+ function CouponMoreLoyaltyCashbackToJSON(value) {
32
+ if (value === undefined) {
33
+ return undefined;
34
+ }
35
+ if (value === null) {
36
+ return null;
37
+ }
38
+ return {
39
+ 'loyalty_cashback': value.loyalty_cashback,
40
+ };
41
+ }
42
+ exports.CouponMoreLoyaltyCashbackToJSON = CouponMoreLoyaltyCashbackToJSON;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * UltraCart Rest API V2
3
+ * UltraCart REST API Version 2
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: support@ultracart.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface CouponMoreLoyaltyPoints
16
+ */
17
+ export interface CouponMoreLoyaltyPoints {
18
+ /**
19
+ * The additional loyalty points
20
+ * @type {number}
21
+ * @memberof CouponMoreLoyaltyPoints
22
+ */
23
+ loyalty_points?: number;
24
+ }
25
+ export declare function CouponMoreLoyaltyPointsFromJSON(json: any): CouponMoreLoyaltyPoints;
26
+ export declare function CouponMoreLoyaltyPointsFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponMoreLoyaltyPoints;
27
+ export declare function CouponMoreLoyaltyPointsToJSON(value?: CouponMoreLoyaltyPoints | null): any;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * UltraCart Rest API V2
6
+ * UltraCart REST API Version 2
7
+ *
8
+ * The version of the OpenAPI document: 2.0.0
9
+ * Contact: support@ultracart.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.CouponMoreLoyaltyPointsToJSON = exports.CouponMoreLoyaltyPointsFromJSONTyped = exports.CouponMoreLoyaltyPointsFromJSON = void 0;
17
+ var runtime_1 = require("../runtime");
18
+ function CouponMoreLoyaltyPointsFromJSON(json) {
19
+ return CouponMoreLoyaltyPointsFromJSONTyped(json, false);
20
+ }
21
+ exports.CouponMoreLoyaltyPointsFromJSON = CouponMoreLoyaltyPointsFromJSON;
22
+ function CouponMoreLoyaltyPointsFromJSONTyped(json, ignoreDiscriminator) {
23
+ if ((json === undefined) || (json === null)) {
24
+ return json;
25
+ }
26
+ return {
27
+ 'loyalty_points': !(0, runtime_1.exists)(json, 'loyalty_points') ? undefined : json['loyalty_points'],
28
+ };
29
+ }
30
+ exports.CouponMoreLoyaltyPointsFromJSONTyped = CouponMoreLoyaltyPointsFromJSONTyped;
31
+ function CouponMoreLoyaltyPointsToJSON(value) {
32
+ if (value === undefined) {
33
+ return undefined;
34
+ }
35
+ if (value === null) {
36
+ return null;
37
+ }
38
+ return {
39
+ 'loyalty_points': value.loyalty_points,
40
+ };
41
+ }
42
+ exports.CouponMoreLoyaltyPointsToJSON = CouponMoreLoyaltyPointsToJSON;
@@ -0,0 +1,27 @@
1
+ /**
2
+ * UltraCart Rest API V2
3
+ * UltraCart REST API Version 2
4
+ *
5
+ * The version of the OpenAPI document: 2.0.0
6
+ * Contact: support@ultracart.com
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface CouponPercentMoreLoyaltyCashback
16
+ */
17
+ export interface CouponPercentMoreLoyaltyCashback {
18
+ /**
19
+ * The percentage of additional loyalty cashback
20
+ * @type {number}
21
+ * @memberof CouponPercentMoreLoyaltyCashback
22
+ */
23
+ percent_more_loyalty_cashback?: number;
24
+ }
25
+ export declare function CouponPercentMoreLoyaltyCashbackFromJSON(json: any): CouponPercentMoreLoyaltyCashback;
26
+ export declare function CouponPercentMoreLoyaltyCashbackFromJSONTyped(json: any, ignoreDiscriminator: boolean): CouponPercentMoreLoyaltyCashback;
27
+ export declare function CouponPercentMoreLoyaltyCashbackToJSON(value?: CouponPercentMoreLoyaltyCashback | null): any;