@longvansoftware/service-js-client 1.7.8 → 1.7.9
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.
@@ -72,6 +72,7 @@ export declare class OrderService extends Service {
|
|
72
72
|
* @throws If an error occurs while updating the customer and shipping address.
|
73
73
|
*/
|
74
74
|
updateCustomerAndShippingAddress(orderId: string, customerData: string, shippingAddress: string): Promise<any>;
|
75
|
+
updateCustomerInOrder(orderId: string, customerData: any): Promise<any>;
|
75
76
|
/**
|
76
77
|
* Retrieves the order line items for a specific order.
|
77
78
|
* @param partnerId - The partner ID.
|
@@ -184,6 +184,21 @@ class OrderService extends serviceSDK_1.Service {
|
|
184
184
|
}
|
185
185
|
});
|
186
186
|
}
|
187
|
+
updateCustomerInOrder(orderId, customerData) {
|
188
|
+
return __awaiter(this, void 0, void 0, function* () {
|
189
|
+
const endpoint = `/front/orders/${this.orgId}/${orderId}/customerInfo`;
|
190
|
+
const method = "PUT";
|
191
|
+
const requestData = Object.assign({}, customerData);
|
192
|
+
try {
|
193
|
+
const response = yield this.restApiCallWithToken(endpoint, method, requestData);
|
194
|
+
return response;
|
195
|
+
}
|
196
|
+
catch (error) {
|
197
|
+
console.log(`Error in updateCustomerInOrder: ${error}`);
|
198
|
+
throw error;
|
199
|
+
}
|
200
|
+
});
|
201
|
+
}
|
187
202
|
/**
|
188
203
|
* Retrieves the order line items for a specific order.
|
189
204
|
* @param partnerId - The partner ID.
|