starta.apiclient 1.112.12577 → 1.112.12579
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.
|
@@ -35,7 +35,7 @@ export default class Orders {
|
|
|
35
35
|
resources?: Array<string>;
|
|
36
36
|
}): Promise<import("../../types").StartaResponse>;
|
|
37
37
|
get(organizationOrCustomerLogin: string, orderId: any): Promise<import("../../types").StartaResponse>;
|
|
38
|
-
add(organizationLogin: string, { products, usedMaterials, customerId, scheduleId, status, repeatSettings, organizationComment, loyaltyCardId, loyaltyProgramId, }: OrderData): Promise<import("../../types").StartaResponse>;
|
|
38
|
+
add(organizationLogin: string, { products, usedMaterials, customerId, scheduleId, status, repeatSettings, organizationComment, loyaltyCardId, loyaltyProgramId, promocodes, }: OrderData): Promise<import("../../types").StartaResponse>;
|
|
39
39
|
update(organizationLogin: string, orderId: string, { products, usedMaterials, scheduleId, status, repeatSettings, organizationComment, customerId, loyaltyCardId, loyaltyProgramId, }: OrderData): Promise<import("../../types").StartaResponse>;
|
|
40
40
|
setPhotos(organizationLogin: string, orderId: string, photos: Array<{
|
|
41
41
|
imageId: string;
|
|
@@ -46,4 +46,5 @@ export default class Orders {
|
|
|
46
46
|
setConfirmation(organizationOrCustomerLogin: string, orderId: string, { isConfirmed }: {
|
|
47
47
|
isConfirmed: boolean;
|
|
48
48
|
}): Promise<import("../../types").StartaResponse>;
|
|
49
|
+
addPromocode(organizationLogin: string, orderId: string, promocode: string): Promise<import("../../types").StartaResponse>;
|
|
49
50
|
}
|
|
@@ -49,7 +49,7 @@ class Orders {
|
|
|
49
49
|
method: 'GET',
|
|
50
50
|
});
|
|
51
51
|
}
|
|
52
|
-
add(organizationLogin, { products, usedMaterials, customerId, scheduleId, status = 'new', repeatSettings, organizationComment, loyaltyCardId, loyaltyProgramId, }) {
|
|
52
|
+
add(organizationLogin, { products, usedMaterials, customerId, scheduleId, status = 'new', repeatSettings, organizationComment, loyaltyCardId, loyaltyProgramId, promocodes, }) {
|
|
53
53
|
return this._requestRunner.performRequest({
|
|
54
54
|
url: `accounts/${organizationLogin}/orders`,
|
|
55
55
|
method: 'POST',
|
|
@@ -63,6 +63,7 @@ class Orders {
|
|
|
63
63
|
organizationComment,
|
|
64
64
|
loyaltyCardId,
|
|
65
65
|
loyaltyProgramId,
|
|
66
|
+
promocodes,
|
|
66
67
|
},
|
|
67
68
|
});
|
|
68
69
|
}
|
|
@@ -117,5 +118,14 @@ class Orders {
|
|
|
117
118
|
},
|
|
118
119
|
});
|
|
119
120
|
}
|
|
121
|
+
addPromocode(organizationLogin, orderId, promocode) {
|
|
122
|
+
return this._requestRunner.performRequest({
|
|
123
|
+
url: `accounts/${organizationLogin}/orders/${orderId}/promocodes`,
|
|
124
|
+
method: 'POST',
|
|
125
|
+
body: {
|
|
126
|
+
promocode,
|
|
127
|
+
},
|
|
128
|
+
});
|
|
129
|
+
}
|
|
120
130
|
}
|
|
121
131
|
exports.default = Orders;
|
package/lib/types.d.ts
CHANGED