mts-booking-library 1.0.2 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
package/lib/index.js
CHANGED
@@ -245,7 +245,7 @@ var Booking = /** @class */ (function () {
|
|
245
245
|
if (params.departureStopName === undefined || params.destinationStopName === undefined) {
|
246
246
|
throw Error("Fields departureStopName and destinationStopName are required");
|
247
247
|
}
|
248
|
-
url = "".concat(this.config.API_ENDPOINT, "/booking/journeys?").concat(new URLSearchParams(__assign(__assign({}, (this.sellerId && { sellerId: this.sellerId.toString() })), { departureStopName: params.departureStopName, destinationStopName: params.destinationStopName, passengersNumber: params.passengersNumber.toString(), date: params.date.toDateString(), currency: params.currency, isRoundtrip: params.isRoundtrip.toString() })));
|
248
|
+
url = "".concat(this.config.API_ENDPOINT, "/booking/journeys?").concat(new URLSearchParams(__assign(__assign({}, (this.sellerId && { sellerId: this.sellerId.toString() })), { departureStopName: params.departureStopName, destinationStopName: params.destinationStopName, passengersNumber: params.passengersNumber.toString(), date: params.date.toDateString(), roundTripDate: params.roundTripDate ? params.roundTripDate.toDateString() : "null", currency: params.currency, isRoundtrip: params.isRoundtrip.toString() })));
|
249
249
|
return [2 /*return*/, (0, apiCall_1.makeGet)(url)];
|
250
250
|
});
|
251
251
|
});
|
package/lib/types/Info.d.ts
CHANGED
@@ -7,6 +7,7 @@ exports.DefaultJourneySearch = {
|
|
7
7
|
destinationStopName: "",
|
8
8
|
passengersNumber: 1,
|
9
9
|
date: new Date(Date.UTC(new Date().getFullYear(), new Date().getMonth(), new Date().getDate(), 0, 1)),
|
10
|
+
roundTripDate: null,
|
10
11
|
currency: __1.Booking.Currencies.EUR,
|
11
12
|
isRoundtrip: false,
|
12
13
|
};
|