@infrab4a/connect-angular 4.17.3-beta.13 → 4.17.3-beta.15
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.
- package/esm2020/services/checkout.service.mjs +12 -2
- package/fesm2015/infrab4a-connect-angular.mjs +11 -1
- package/fesm2015/infrab4a-connect-angular.mjs.map +1 -1
- package/fesm2020/infrab4a-connect-angular.mjs +11 -1
- package/fesm2020/infrab4a-connect-angular.mjs.map +1 -1
- package/package.json +1 -1
- package/services/checkout.service.d.ts +3 -1
|
@@ -1110,13 +1110,23 @@ class CheckoutService {
|
|
|
1110
1110
|
clearCheckoutFromSession() {
|
|
1111
1111
|
return this.dataPersistence.remove('checkoutId');
|
|
1112
1112
|
}
|
|
1113
|
-
|
|
1113
|
+
resetCheckoutValues() {
|
|
1114
|
+
return this.getCheckout().pipe(concatMap((checkout) => this.http.post(`${this.checkoutUrl}/checkoutResetValues`, {
|
|
1115
|
+
checkoutId: checkout.id,
|
|
1116
|
+
})), concatMap(() => this.getCheckout()));
|
|
1117
|
+
}
|
|
1118
|
+
applyCouponDiscount(nickname, checkoutType) {
|
|
1114
1119
|
return this.getCheckout().pipe(concatMap((checkout) => this.http.post(`${this.checkoutUrl}/checkoutApplyDiscount`, {
|
|
1115
1120
|
checkoutId: checkout.id,
|
|
1116
1121
|
coupon: nickname,
|
|
1117
1122
|
checkoutType,
|
|
1118
1123
|
})), concatMap(() => this.getCheckout()), map((checkout) => checkout.coupon));
|
|
1119
1124
|
}
|
|
1125
|
+
removeCouponDiscount() {
|
|
1126
|
+
return this.getCheckout().pipe(concatMap((checkout) => this.http.post(`${this.checkoutUrl}/checkoutRemoveDiscount`, {
|
|
1127
|
+
checkoutId: checkout.id,
|
|
1128
|
+
})), concatMap(() => this.getCheckout()));
|
|
1129
|
+
}
|
|
1120
1130
|
validateStockProducts() {
|
|
1121
1131
|
return this.getCheckout().pipe(concatMap((checkout) => this.http.post(`${this.checkoutUrl}/checkoutValidateProductStock`, {
|
|
1122
1132
|
checkoutId: checkout.id,
|