@longvansoftware/storefront-js-client 3.3.1 → 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.
|
@@ -529,4 +529,7 @@ export declare class OrderService extends Service {
|
|
|
529
529
|
*/
|
|
530
530
|
updateCustomerInfoFront(orderId: string, customerInfo: CustomerInfo): Promise<any>;
|
|
531
531
|
removeGiftQuantity(orderId: string, orderItemId: string): Promise<any>;
|
|
532
|
+
removeGiftInOrder(orderId: string, orderItemId: string): Promise<any>;
|
|
533
|
+
tooglePaymentMethod(methodCode: string, status: boolean): Promise<any>;
|
|
534
|
+
choosePaymentGatewayForPaymentMethod(methodCode: string, gatewayId: string): Promise<any>;
|
|
532
535
|
}
|
|
@@ -1604,5 +1604,44 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
1604
1604
|
}
|
|
1605
1605
|
});
|
|
1606
1606
|
}
|
|
1607
|
+
removeGiftInOrder(orderId, orderItemId) {
|
|
1608
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
1609
|
+
const endpoint = `/orders/${this.orgId}/${this.storeId}/${orderId}/${orderItemId}/deleteOrderLineItem`;
|
|
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";
|
|
1637
|
+
try {
|
|
1638
|
+
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
1639
|
+
return response;
|
|
1640
|
+
}
|
|
1641
|
+
catch (error) {
|
|
1642
|
+
throw error;
|
|
1643
|
+
}
|
|
1644
|
+
});
|
|
1645
|
+
}
|
|
1607
1646
|
}
|
|
1608
1647
|
exports.OrderService = OrderService;
|