mts-booking-library 1.2.12 → 1.2.13
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/lib/booking/booking.js +4 -4
- package/package.json +1 -1
package/lib/booking/booking.js
CHANGED
@@ -286,13 +286,13 @@ var Booking = /** @class */ (function () {
|
|
286
286
|
paymentMethodToSet = paymentMethod;
|
287
287
|
if (!(paymentMethod === Payment_1.PaymentMethods.ZERO_COST)) return [3 /*break*/, 2];
|
288
288
|
return [4 /*yield*/, this.addReduction({ tripId: 0, reduction: 1, isPercentage: true }).then(function (response) {
|
289
|
+
if (typeof response === "boolean" && response) {
|
290
|
+
// Reduction was successfully added. Set payment method to CASH
|
291
|
+
paymentMethodToSet = Payment_1.PaymentMethods.CASH;
|
292
|
+
}
|
289
293
|
if ((0, ErrorResponse_1.objectIsMTSErrorResponse)(response)) {
|
290
294
|
return response;
|
291
295
|
}
|
292
|
-
else {
|
293
|
-
// Request was successful. Set payment method to CASH
|
294
|
-
paymentMethodToSet = Payment_1.PaymentMethods.CASH;
|
295
|
-
}
|
296
296
|
})];
|
297
297
|
case 1:
|
298
298
|
_e.sent();
|