@longvansoftware/storefront-js-client 2.6.8 → 2.6.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.
@@ -120,7 +120,7 @@ export declare class OrderService extends Service {
120
120
  * @returns A promise that resolves when the customer and shipping address are updated.
121
121
  * @throws If an error occurs while updating the customer and shipping address.
122
122
  */
123
- updatePriceInOrder(orderId: string, orderItemId: string, priceNew: number): Promise<any>;
123
+ updatePriceInOrder(orderId: string, orderItemId: string, priceNew: number, reason: string): Promise<any>;
124
124
  /**
125
125
  * Update discount price in order
126
126
  * @param orderId - The ID of the order.
@@ -283,12 +283,15 @@ class OrderService extends serviceSDK_1.Service {
283
283
  * @returns A promise that resolves when the customer and shipping address are updated.
284
284
  * @throws If an error occurs while updating the customer and shipping address.
285
285
  */
286
- updatePriceInOrder(orderId, orderItemId, priceNew) {
286
+ updatePriceInOrder(orderId, orderItemId, priceNew, reason) {
287
287
  return __awaiter(this, void 0, void 0, function* () {
288
288
  const endpoint = `/orders/${this.orgId}/${this.storeId}/${orderId}/${orderItemId}/price?price_new=${priceNew}`;
289
289
  const method = "PUT";
290
+ const dataReq = {
291
+ reason,
292
+ };
290
293
  try {
291
- const response = yield this.restApiCallWithToken(endpoint, method);
294
+ const response = yield this.restApiCallWithToken(endpoint, method, dataReq);
292
295
  return response;
293
296
  }
294
297
  catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "2.6.8",
3
+ "version": "2.6.9",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [