@longvansoftware/storefront-js-client 2.8.8 → 2.9.0
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.
|
@@ -512,11 +512,10 @@ export declare class OrderService extends Service {
|
|
|
512
512
|
updateVatInorder(orderId: string, orderItemId: string, vatRate: string): Promise<any>;
|
|
513
513
|
/**
|
|
514
514
|
* Updates the referral code for an order
|
|
515
|
-
* @param partnerId - The partner ID
|
|
516
515
|
* @param orderId - The ID of the order
|
|
517
516
|
* @param referralCode - The referral code to update
|
|
518
517
|
* @returns A promise that resolves when the referral code is updated
|
|
519
518
|
* @throws If an error occurs while updating the referral code
|
|
520
519
|
*/
|
|
521
|
-
updateReferralCode(
|
|
520
|
+
updateReferralCode(orderId: string, referralCode: string): Promise<any>;
|
|
522
521
|
}
|
|
@@ -1500,7 +1500,7 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
1500
1500
|
updateVatInorder(orderId, orderItemId, vatRate) {
|
|
1501
1501
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1502
1502
|
const endpoint = `/orders/${this.orgId}/${this.storeId}/${orderId}/${orderItemId}/${vatRate}/vatProduct`;
|
|
1503
|
-
const method =
|
|
1503
|
+
const method = "PUT";
|
|
1504
1504
|
try {
|
|
1505
1505
|
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
1506
1506
|
return response;
|
|
@@ -1512,16 +1512,16 @@ class OrderService extends serviceSDK_1.Service {
|
|
|
1512
1512
|
}
|
|
1513
1513
|
/**
|
|
1514
1514
|
* Updates the referral code for an order
|
|
1515
|
-
* @param partnerId - The partner ID
|
|
1516
1515
|
* @param orderId - The ID of the order
|
|
1517
1516
|
* @param referralCode - The referral code to update
|
|
1518
1517
|
* @returns A promise that resolves when the referral code is updated
|
|
1519
1518
|
* @throws If an error occurs while updating the referral code
|
|
1520
1519
|
*/
|
|
1521
|
-
updateReferralCode(
|
|
1520
|
+
updateReferralCode(orderId, referralCode) {
|
|
1522
1521
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1523
|
-
const endpoint = `/
|
|
1522
|
+
const endpoint = `/orders/${this.orgId}/${orderId}/${referralCode}/updateReferralCode`;
|
|
1524
1523
|
const method = "PUT";
|
|
1524
|
+
console.log("🚀 ~ OrderService ~ updateReferralCode ~ endpoint:", endpoint);
|
|
1525
1525
|
try {
|
|
1526
1526
|
const response = yield this.restApiCallWithToken(endpoint, method);
|
|
1527
1527
|
return response;
|