ultracart_rest_api_v2_typescript 4.0.87-RC → 4.0.89-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.
- package/README.md +4 -2
- package/dist/apis/ConversationApi.d.ts +27 -0
- package/dist/apis/ConversationApi.js +57 -0
- package/dist/models/ConversationMessage.d.ts +6 -0
- package/dist/models/ConversationMessage.js +2 -0
- package/dist/models/OrderItem.d.ts +18 -0
- package/dist/models/OrderItem.js +6 -0
- package/package.json +1 -1
- package/src/apis/ConversationApi.ts +60 -0
- package/src/models/ConversationMessage.ts +8 -0
- package/src/models/OrderItem.ts +24 -0
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@4.0.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@4.0.89-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.
|
|
39
|
+
npm install ultracart_rest_api_v2_typescript@4.0.89-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.89-RC | 11/30/2022 | order item - addl fields for linking kits to kit components |
|
|
58
|
+
| 4.0.88-RC | 11/29/2022 | converstation marked convo read method |
|
|
57
59
|
| 4.0.87-RC | 11/21/2022 | coupon - addl optional minimums for percent off msrp items coupon |
|
|
58
60
|
| 4.0.86-RC | 11/21/2022 | conversation context method |
|
|
59
61
|
| 4.0.85-RC | 11/21/2022 | adjusted conversation event model |
|
|
@@ -38,6 +38,9 @@ export interface JoinConversationRequest {
|
|
|
38
38
|
export interface LeaveConversationRequest {
|
|
39
39
|
conversationUuid: string;
|
|
40
40
|
}
|
|
41
|
+
export interface MarkReadConversationRequest {
|
|
42
|
+
conversationUuid: string;
|
|
43
|
+
}
|
|
41
44
|
export interface StartConversationRequest {
|
|
42
45
|
startRequest: ConversationStartRequest;
|
|
43
46
|
}
|
|
@@ -195,6 +198,20 @@ export interface ConversationApiInterface {
|
|
|
195
198
|
* Leave a conversation
|
|
196
199
|
*/
|
|
197
200
|
leaveConversation(requestParameters: LeaveConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
201
|
+
/**
|
|
202
|
+
* Mark a conversation as read
|
|
203
|
+
* @summary Mark a conversation as read
|
|
204
|
+
* @param {string} conversationUuid
|
|
205
|
+
* @param {*} [options] Override http request option.
|
|
206
|
+
* @throws {RequiredError}
|
|
207
|
+
* @memberof ConversationApiInterface
|
|
208
|
+
*/
|
|
209
|
+
markReadConversationRaw(requestParameters: MarkReadConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
210
|
+
/**
|
|
211
|
+
* Mark a conversation as read
|
|
212
|
+
* Mark a conversation as read
|
|
213
|
+
*/
|
|
214
|
+
markReadConversation(requestParameters: MarkReadConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
198
215
|
/**
|
|
199
216
|
* Start a new conversation
|
|
200
217
|
* @summary Start a conversation
|
|
@@ -329,6 +346,16 @@ export declare class ConversationApi extends runtime.BaseAPI implements Conversa
|
|
|
329
346
|
* Leave a conversation
|
|
330
347
|
*/
|
|
331
348
|
leaveConversation(requestParameters: LeaveConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
349
|
+
/**
|
|
350
|
+
* Mark a conversation as read
|
|
351
|
+
* Mark a conversation as read
|
|
352
|
+
*/
|
|
353
|
+
markReadConversationRaw(requestParameters: MarkReadConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
354
|
+
/**
|
|
355
|
+
* Mark a conversation as read
|
|
356
|
+
* Mark a conversation as read
|
|
357
|
+
*/
|
|
358
|
+
markReadConversation(requestParameters: MarkReadConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
332
359
|
/**
|
|
333
360
|
* Start a new conversation
|
|
334
361
|
* Start a conversation
|
|
@@ -669,6 +669,63 @@ var ConversationApi = /** @class */ (function (_super) {
|
|
|
669
669
|
});
|
|
670
670
|
});
|
|
671
671
|
};
|
|
672
|
+
/**
|
|
673
|
+
* Mark a conversation as read
|
|
674
|
+
* Mark a conversation as read
|
|
675
|
+
*/
|
|
676
|
+
ConversationApi.prototype.markReadConversationRaw = function (requestParameters, initOverrides) {
|
|
677
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
678
|
+
var queryParameters, headerParameters, _a, _b, response;
|
|
679
|
+
return __generator(this, function (_c) {
|
|
680
|
+
switch (_c.label) {
|
|
681
|
+
case 0:
|
|
682
|
+
if (requestParameters.conversationUuid === null || requestParameters.conversationUuid === undefined) {
|
|
683
|
+
throw new runtime.RequiredError('conversationUuid', 'Required parameter requestParameters.conversationUuid was null or undefined when calling markReadConversation.');
|
|
684
|
+
}
|
|
685
|
+
queryParameters = {};
|
|
686
|
+
headerParameters = {};
|
|
687
|
+
if (!(this.configuration && this.configuration.accessToken)) return [3 /*break*/, 2];
|
|
688
|
+
// oauth required
|
|
689
|
+
_a = headerParameters;
|
|
690
|
+
_b = "Authorization";
|
|
691
|
+
return [4 /*yield*/, this.configuration.accessToken("ultraCartOauth", ["conversation_write"])];
|
|
692
|
+
case 1:
|
|
693
|
+
// oauth required
|
|
694
|
+
_a[_b] = _c.sent();
|
|
695
|
+
_c.label = 2;
|
|
696
|
+
case 2:
|
|
697
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
698
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
699
|
+
}
|
|
700
|
+
return [4 /*yield*/, this.request({
|
|
701
|
+
path: "/conversation/conversations/{conversation_uuid}/markread".replace("{".concat("conversation_uuid", "}"), encodeURIComponent(String(requestParameters.conversationUuid))),
|
|
702
|
+
method: 'PUT',
|
|
703
|
+
headers: headerParameters,
|
|
704
|
+
query: queryParameters,
|
|
705
|
+
}, initOverrides)];
|
|
706
|
+
case 3:
|
|
707
|
+
response = _c.sent();
|
|
708
|
+
return [2 /*return*/, new runtime.VoidApiResponse(response)];
|
|
709
|
+
}
|
|
710
|
+
});
|
|
711
|
+
});
|
|
712
|
+
};
|
|
713
|
+
/**
|
|
714
|
+
* Mark a conversation as read
|
|
715
|
+
* Mark a conversation as read
|
|
716
|
+
*/
|
|
717
|
+
ConversationApi.prototype.markReadConversation = function (requestParameters, initOverrides) {
|
|
718
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
719
|
+
return __generator(this, function (_a) {
|
|
720
|
+
switch (_a.label) {
|
|
721
|
+
case 0: return [4 /*yield*/, this.markReadConversationRaw(requestParameters, initOverrides)];
|
|
722
|
+
case 1:
|
|
723
|
+
_a.sent();
|
|
724
|
+
return [2 /*return*/];
|
|
725
|
+
}
|
|
726
|
+
});
|
|
727
|
+
});
|
|
728
|
+
};
|
|
672
729
|
/**
|
|
673
730
|
* Start a new conversation
|
|
674
731
|
* Start a conversation
|
|
@@ -46,6 +46,12 @@ export interface ConversationMessage {
|
|
|
46
46
|
* @memberof ConversationMessage
|
|
47
47
|
*/
|
|
48
48
|
conversation_message_uuid?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Delay message transmission until date/time
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof ConversationMessage
|
|
53
|
+
*/
|
|
54
|
+
delay_until_dts?: string;
|
|
49
55
|
/**
|
|
50
56
|
*
|
|
51
57
|
* @type {Array<string>}
|
|
@@ -37,6 +37,7 @@ function ConversationMessageFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
37
37
|
'body': !(0, runtime_1.exists)(json, 'body') ? undefined : json['body'],
|
|
38
38
|
'client_message_id': !(0, runtime_1.exists)(json, 'client_message_id') ? undefined : json['client_message_id'],
|
|
39
39
|
'conversation_message_uuid': !(0, runtime_1.exists)(json, 'conversation_message_uuid') ? undefined : json['conversation_message_uuid'],
|
|
40
|
+
'delay_until_dts': !(0, runtime_1.exists)(json, 'delay_until_dts') ? undefined : json['delay_until_dts'],
|
|
40
41
|
'media_urls': !(0, runtime_1.exists)(json, 'media_urls') ? undefined : json['media_urls'],
|
|
41
42
|
'merchant_id': !(0, runtime_1.exists)(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
42
43
|
'message_dts': !(0, runtime_1.exists)(json, 'message_dts') ? undefined : json['message_dts'],
|
|
@@ -60,6 +61,7 @@ function ConversationMessageToJSON(value) {
|
|
|
60
61
|
'body': value.body,
|
|
61
62
|
'client_message_id': value.client_message_id,
|
|
62
63
|
'conversation_message_uuid': value.conversation_message_uuid,
|
|
64
|
+
'delay_until_dts': value.delay_until_dts,
|
|
63
65
|
'media_urls': value.media_urls,
|
|
64
66
|
'merchant_id': value.merchant_id,
|
|
65
67
|
'message_dts': value.message_dts,
|
|
@@ -154,6 +154,12 @@ export interface OrderItem {
|
|
|
154
154
|
* @memberof OrderItem
|
|
155
155
|
*/
|
|
156
156
|
height?: Distance;
|
|
157
|
+
/**
|
|
158
|
+
* Index of the item on the order (one based index)
|
|
159
|
+
* @type {number}
|
|
160
|
+
* @memberof OrderItem
|
|
161
|
+
*/
|
|
162
|
+
item_index?: number;
|
|
157
163
|
/**
|
|
158
164
|
* Item reference object identifier used to linked to auto order item record
|
|
159
165
|
* @type {number}
|
|
@@ -226,6 +232,18 @@ export interface OrderItem {
|
|
|
226
232
|
* @memberof OrderItem
|
|
227
233
|
*/
|
|
228
234
|
packed_by_user?: string;
|
|
235
|
+
/**
|
|
236
|
+
* If this item is a kit component, this is the item index of the parent item (kit)
|
|
237
|
+
* @type {number}
|
|
238
|
+
* @memberof OrderItem
|
|
239
|
+
*/
|
|
240
|
+
parent_item_index?: number;
|
|
241
|
+
/**
|
|
242
|
+
* If this item is a kit component, this is the item id of the parent item (kit)
|
|
243
|
+
* @type {string}
|
|
244
|
+
* @memberof OrderItem
|
|
245
|
+
*/
|
|
246
|
+
parent_merchant_item_id?: string;
|
|
229
247
|
/**
|
|
230
248
|
* Perishable class of the item
|
|
231
249
|
* @type {string}
|
package/dist/models/OrderItem.js
CHANGED
|
@@ -62,6 +62,7 @@ function OrderItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
62
62
|
'free_shipping': !(0, runtime_1.exists)(json, 'free_shipping') ? undefined : json['free_shipping'],
|
|
63
63
|
'hazmat': !(0, runtime_1.exists)(json, 'hazmat') ? undefined : json['hazmat'],
|
|
64
64
|
'height': !(0, runtime_1.exists)(json, 'height') ? undefined : (0, Distance_1.DistanceFromJSON)(json['height']),
|
|
65
|
+
'item_index': !(0, runtime_1.exists)(json, 'item_index') ? undefined : json['item_index'],
|
|
65
66
|
'item_reference_oid': !(0, runtime_1.exists)(json, 'item_reference_oid') ? undefined : json['item_reference_oid'],
|
|
66
67
|
'kit': !(0, runtime_1.exists)(json, 'kit') ? undefined : json['kit'],
|
|
67
68
|
'kit_component': !(0, runtime_1.exists)(json, 'kit_component') ? undefined : json['kit_component'],
|
|
@@ -74,6 +75,8 @@ function OrderItemFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
74
75
|
'no_shipping_discount': !(0, runtime_1.exists)(json, 'no_shipping_discount') ? undefined : json['no_shipping_discount'],
|
|
75
76
|
'options': !(0, runtime_1.exists)(json, 'options') ? undefined : (json['options'].map(OrderItemOption_1.OrderItemOptionFromJSON)),
|
|
76
77
|
'packed_by_user': !(0, runtime_1.exists)(json, 'packed_by_user') ? undefined : json['packed_by_user'],
|
|
78
|
+
'parent_item_index': !(0, runtime_1.exists)(json, 'parent_item_index') ? undefined : json['parent_item_index'],
|
|
79
|
+
'parent_merchant_item_id': !(0, runtime_1.exists)(json, 'parent_merchant_item_id') ? undefined : json['parent_merchant_item_id'],
|
|
77
80
|
'perishable_class': !(0, runtime_1.exists)(json, 'perishable_class') ? undefined : json['perishable_class'],
|
|
78
81
|
'pricing_tier_name': !(0, runtime_1.exists)(json, 'pricing_tier_name') ? undefined : json['pricing_tier_name'],
|
|
79
82
|
'properties': !(0, runtime_1.exists)(json, 'properties') ? undefined : (json['properties'].map(OrderItemProperty_1.OrderItemPropertyFromJSON)),
|
|
@@ -129,6 +132,7 @@ function OrderItemToJSON(value) {
|
|
|
129
132
|
'free_shipping': value.free_shipping,
|
|
130
133
|
'hazmat': value.hazmat,
|
|
131
134
|
'height': (0, Distance_1.DistanceToJSON)(value.height),
|
|
135
|
+
'item_index': value.item_index,
|
|
132
136
|
'item_reference_oid': value.item_reference_oid,
|
|
133
137
|
'kit': value.kit,
|
|
134
138
|
'kit_component': value.kit_component,
|
|
@@ -141,6 +145,8 @@ function OrderItemToJSON(value) {
|
|
|
141
145
|
'no_shipping_discount': value.no_shipping_discount,
|
|
142
146
|
'options': value.options === undefined ? undefined : (value.options.map(OrderItemOption_1.OrderItemOptionToJSON)),
|
|
143
147
|
'packed_by_user': value.packed_by_user,
|
|
148
|
+
'parent_item_index': value.parent_item_index,
|
|
149
|
+
'parent_merchant_item_id': value.parent_merchant_item_id,
|
|
144
150
|
'perishable_class': value.perishable_class,
|
|
145
151
|
'pricing_tier_name': value.pricing_tier_name,
|
|
146
152
|
'properties': value.properties === undefined ? undefined : (value.properties.map(OrderItemProperty_1.OrderItemPropertyToJSON)),
|
package/package.json
CHANGED
|
@@ -84,6 +84,10 @@ export interface LeaveConversationRequest {
|
|
|
84
84
|
conversationUuid: string;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
+
export interface MarkReadConversationRequest {
|
|
88
|
+
conversationUuid: string;
|
|
89
|
+
}
|
|
90
|
+
|
|
87
91
|
export interface StartConversationRequest {
|
|
88
92
|
startRequest: ConversationStartRequest;
|
|
89
93
|
}
|
|
@@ -263,6 +267,22 @@ export interface ConversationApiInterface {
|
|
|
263
267
|
*/
|
|
264
268
|
leaveConversation(requestParameters: LeaveConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
265
269
|
|
|
270
|
+
/**
|
|
271
|
+
* Mark a conversation as read
|
|
272
|
+
* @summary Mark a conversation as read
|
|
273
|
+
* @param {string} conversationUuid
|
|
274
|
+
* @param {*} [options] Override http request option.
|
|
275
|
+
* @throws {RequiredError}
|
|
276
|
+
* @memberof ConversationApiInterface
|
|
277
|
+
*/
|
|
278
|
+
markReadConversationRaw(requestParameters: MarkReadConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* Mark a conversation as read
|
|
282
|
+
* Mark a conversation as read
|
|
283
|
+
*/
|
|
284
|
+
markReadConversation(requestParameters: MarkReadConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
285
|
+
|
|
266
286
|
/**
|
|
267
287
|
* Start a new conversation
|
|
268
288
|
* @summary Start a conversation
|
|
@@ -722,6 +742,46 @@ export class ConversationApi extends runtime.BaseAPI implements ConversationApiI
|
|
|
722
742
|
await this.leaveConversationRaw(requestParameters, initOverrides);
|
|
723
743
|
}
|
|
724
744
|
|
|
745
|
+
/**
|
|
746
|
+
* Mark a conversation as read
|
|
747
|
+
* Mark a conversation as read
|
|
748
|
+
*/
|
|
749
|
+
async markReadConversationRaw(requestParameters: MarkReadConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
750
|
+
if (requestParameters.conversationUuid === null || requestParameters.conversationUuid === undefined) {
|
|
751
|
+
throw new runtime.RequiredError('conversationUuid','Required parameter requestParameters.conversationUuid was null or undefined when calling markReadConversation.');
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
const queryParameters: any = {};
|
|
755
|
+
|
|
756
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
757
|
+
|
|
758
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
759
|
+
// oauth required
|
|
760
|
+
headerParameters["Authorization"] = await this.configuration.accessToken("ultraCartOauth", ["conversation_write"]);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
if (this.configuration && this.configuration.apiKey) {
|
|
764
|
+
headerParameters["x-ultracart-simple-key"] = this.configuration.apiKey("x-ultracart-simple-key"); // ultraCartSimpleApiKey authentication
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
const response = await this.request({
|
|
768
|
+
path: `/conversation/conversations/{conversation_uuid}/markread`.replace(`{${"conversation_uuid"}}`, encodeURIComponent(String(requestParameters.conversationUuid))),
|
|
769
|
+
method: 'PUT',
|
|
770
|
+
headers: headerParameters,
|
|
771
|
+
query: queryParameters,
|
|
772
|
+
}, initOverrides);
|
|
773
|
+
|
|
774
|
+
return new runtime.VoidApiResponse(response);
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
/**
|
|
778
|
+
* Mark a conversation as read
|
|
779
|
+
* Mark a conversation as read
|
|
780
|
+
*/
|
|
781
|
+
async markReadConversation(requestParameters: MarkReadConversationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
782
|
+
await this.markReadConversationRaw(requestParameters, initOverrides);
|
|
783
|
+
}
|
|
784
|
+
|
|
725
785
|
/**
|
|
726
786
|
* Start a new conversation
|
|
727
787
|
* Start a conversation
|
|
@@ -56,6 +56,12 @@ export interface ConversationMessage {
|
|
|
56
56
|
* @memberof ConversationMessage
|
|
57
57
|
*/
|
|
58
58
|
conversation_message_uuid?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Delay message transmission until date/time
|
|
61
|
+
* @type {string}
|
|
62
|
+
* @memberof ConversationMessage
|
|
63
|
+
*/
|
|
64
|
+
delay_until_dts?: string;
|
|
59
65
|
/**
|
|
60
66
|
*
|
|
61
67
|
* @type {Array<string>}
|
|
@@ -126,6 +132,7 @@ export function ConversationMessageFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
126
132
|
'body': !exists(json, 'body') ? undefined : json['body'],
|
|
127
133
|
'client_message_id': !exists(json, 'client_message_id') ? undefined : json['client_message_id'],
|
|
128
134
|
'conversation_message_uuid': !exists(json, 'conversation_message_uuid') ? undefined : json['conversation_message_uuid'],
|
|
135
|
+
'delay_until_dts': !exists(json, 'delay_until_dts') ? undefined : json['delay_until_dts'],
|
|
129
136
|
'media_urls': !exists(json, 'media_urls') ? undefined : json['media_urls'],
|
|
130
137
|
'merchant_id': !exists(json, 'merchant_id') ? undefined : json['merchant_id'],
|
|
131
138
|
'message_dts': !exists(json, 'message_dts') ? undefined : json['message_dts'],
|
|
@@ -150,6 +157,7 @@ export function ConversationMessageToJSON(value?: ConversationMessage | null): a
|
|
|
150
157
|
'body': value.body,
|
|
151
158
|
'client_message_id': value.client_message_id,
|
|
152
159
|
'conversation_message_uuid': value.conversation_message_uuid,
|
|
160
|
+
'delay_until_dts': value.delay_until_dts,
|
|
153
161
|
'media_urls': value.media_urls,
|
|
154
162
|
'merchant_id': value.merchant_id,
|
|
155
163
|
'message_dts': value.message_dts,
|
package/src/models/OrderItem.ts
CHANGED
|
@@ -194,6 +194,12 @@ export interface OrderItem {
|
|
|
194
194
|
* @memberof OrderItem
|
|
195
195
|
*/
|
|
196
196
|
height?: Distance;
|
|
197
|
+
/**
|
|
198
|
+
* Index of the item on the order (one based index)
|
|
199
|
+
* @type {number}
|
|
200
|
+
* @memberof OrderItem
|
|
201
|
+
*/
|
|
202
|
+
item_index?: number;
|
|
197
203
|
/**
|
|
198
204
|
* Item reference object identifier used to linked to auto order item record
|
|
199
205
|
* @type {number}
|
|
@@ -266,6 +272,18 @@ export interface OrderItem {
|
|
|
266
272
|
* @memberof OrderItem
|
|
267
273
|
*/
|
|
268
274
|
packed_by_user?: string;
|
|
275
|
+
/**
|
|
276
|
+
* If this item is a kit component, this is the item index of the parent item (kit)
|
|
277
|
+
* @type {number}
|
|
278
|
+
* @memberof OrderItem
|
|
279
|
+
*/
|
|
280
|
+
parent_item_index?: number;
|
|
281
|
+
/**
|
|
282
|
+
* If this item is a kit component, this is the item id of the parent item (kit)
|
|
283
|
+
* @type {string}
|
|
284
|
+
* @memberof OrderItem
|
|
285
|
+
*/
|
|
286
|
+
parent_merchant_item_id?: string;
|
|
269
287
|
/**
|
|
270
288
|
* Perishable class of the item
|
|
271
289
|
* @type {string}
|
|
@@ -445,6 +463,7 @@ export function OrderItemFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
445
463
|
'free_shipping': !exists(json, 'free_shipping') ? undefined : json['free_shipping'],
|
|
446
464
|
'hazmat': !exists(json, 'hazmat') ? undefined : json['hazmat'],
|
|
447
465
|
'height': !exists(json, 'height') ? undefined : DistanceFromJSON(json['height']),
|
|
466
|
+
'item_index': !exists(json, 'item_index') ? undefined : json['item_index'],
|
|
448
467
|
'item_reference_oid': !exists(json, 'item_reference_oid') ? undefined : json['item_reference_oid'],
|
|
449
468
|
'kit': !exists(json, 'kit') ? undefined : json['kit'],
|
|
450
469
|
'kit_component': !exists(json, 'kit_component') ? undefined : json['kit_component'],
|
|
@@ -457,6 +476,8 @@ export function OrderItemFromJSONTyped(json: any, ignoreDiscriminator: boolean):
|
|
|
457
476
|
'no_shipping_discount': !exists(json, 'no_shipping_discount') ? undefined : json['no_shipping_discount'],
|
|
458
477
|
'options': !exists(json, 'options') ? undefined : ((json['options'] as Array<any>).map(OrderItemOptionFromJSON)),
|
|
459
478
|
'packed_by_user': !exists(json, 'packed_by_user') ? undefined : json['packed_by_user'],
|
|
479
|
+
'parent_item_index': !exists(json, 'parent_item_index') ? undefined : json['parent_item_index'],
|
|
480
|
+
'parent_merchant_item_id': !exists(json, 'parent_merchant_item_id') ? undefined : json['parent_merchant_item_id'],
|
|
460
481
|
'perishable_class': !exists(json, 'perishable_class') ? undefined : json['perishable_class'],
|
|
461
482
|
'pricing_tier_name': !exists(json, 'pricing_tier_name') ? undefined : json['pricing_tier_name'],
|
|
462
483
|
'properties': !exists(json, 'properties') ? undefined : ((json['properties'] as Array<any>).map(OrderItemPropertyFromJSON)),
|
|
@@ -513,6 +534,7 @@ export function OrderItemToJSON(value?: OrderItem | null): any {
|
|
|
513
534
|
'free_shipping': value.free_shipping,
|
|
514
535
|
'hazmat': value.hazmat,
|
|
515
536
|
'height': DistanceToJSON(value.height),
|
|
537
|
+
'item_index': value.item_index,
|
|
516
538
|
'item_reference_oid': value.item_reference_oid,
|
|
517
539
|
'kit': value.kit,
|
|
518
540
|
'kit_component': value.kit_component,
|
|
@@ -525,6 +547,8 @@ export function OrderItemToJSON(value?: OrderItem | null): any {
|
|
|
525
547
|
'no_shipping_discount': value.no_shipping_discount,
|
|
526
548
|
'options': value.options === undefined ? undefined : ((value.options as Array<any>).map(OrderItemOptionToJSON)),
|
|
527
549
|
'packed_by_user': value.packed_by_user,
|
|
550
|
+
'parent_item_index': value.parent_item_index,
|
|
551
|
+
'parent_merchant_item_id': value.parent_merchant_item_id,
|
|
528
552
|
'perishable_class': value.perishable_class,
|
|
529
553
|
'pricing_tier_name': value.pricing_tier_name,
|
|
530
554
|
'properties': value.properties === undefined ? undefined : ((value.properties as Array<any>).map(OrderItemPropertyToJSON)),
|