@longvansoftware/storefront-js-client 3.3.2 → 3.3.3

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.
@@ -530,4 +530,6 @@ export declare class OrderService extends Service {
530
530
  updateCustomerInfoFront(orderId: string, customerInfo: CustomerInfo): Promise<any>;
531
531
  removeGiftQuantity(orderId: string, orderItemId: string): Promise<any>;
532
532
  removeGiftInOrder(orderId: string, orderItemId: string): Promise<any>;
533
+ tooglePaymentMethod(methodCode: string, status: boolean): Promise<any>;
534
+ choosePaymentGatewayForPaymentMethod(methodCode: string, gatewayId: string): Promise<any>;
533
535
  }
@@ -1607,7 +1607,33 @@ class OrderService extends serviceSDK_1.Service {
1607
1607
  removeGiftInOrder(orderId, orderItemId) {
1608
1608
  return __awaiter(this, void 0, void 0, function* () {
1609
1609
  const endpoint = `/orders/${this.orgId}/${this.storeId}/${orderId}/${orderItemId}/deleteOrderLineItem`;
1610
- const method = 'DELETE';
1610
+ const method = "DELETE";
1611
+ try {
1612
+ const response = yield this.restApiCallWithToken(endpoint, method);
1613
+ return response;
1614
+ }
1615
+ catch (error) {
1616
+ throw error;
1617
+ }
1618
+ });
1619
+ }
1620
+ tooglePaymentMethod(methodCode, status) {
1621
+ return __awaiter(this, void 0, void 0, function* () {
1622
+ const endpoint = `/store-channels/${this.orgId}/${this.storeId}/payment-methods/${methodCode}/enable/${status}`;
1623
+ const method = "PUT";
1624
+ try {
1625
+ const response = yield this.restApiCallWithToken(endpoint, method);
1626
+ return response;
1627
+ }
1628
+ catch (error) {
1629
+ throw error;
1630
+ }
1631
+ });
1632
+ }
1633
+ choosePaymentGatewayForPaymentMethod(methodCode, gatewayId) {
1634
+ return __awaiter(this, void 0, void 0, function* () {
1635
+ const endpoint = `/store-channels/${this.orgId}/${this.storeId}/payment-methods/${methodCode}/payment-gateways/${gatewayId}`;
1636
+ const method = "PUT";
1611
1637
  try {
1612
1638
  const response = yield this.restApiCallWithToken(endpoint, method);
1613
1639
  return response;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@longvansoftware/storefront-js-client",
3
- "version": "3.3.2",
3
+ "version": "3.3.3",
4
4
  "main": "dist/src/index.js",
5
5
  "types": "dist/src/index.d.ts",
6
6
  "files": [