mts-booking-library 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
@@ -93,10 +93,10 @@ export declare class ServiceBooking extends Booking {
|
|
93
93
|
* and/or a specific hour for the tour.
|
94
94
|
* You should call this method only if {@link Service.isDateOptional} or {@link Service.isDateRequired} is true for the selected tour.
|
95
95
|
* @param {number} serviceId The id of the selected tour (can be retrieved in the object {@link Service} returned by {@link getTours})
|
96
|
-
* @param {
|
96
|
+
* @param {string} date The date on which to get the tours, in ISO string format
|
97
97
|
* @returns {ServiceTrip[]} The returned information about the tour (tripId and hour)
|
98
98
|
*/
|
99
|
-
getServiceTrips(serviceId: number, date:
|
99
|
+
getServiceTrips(serviceId: number, date: string): Promise<ErrorResponse | ServiceTrip[]>;
|
100
100
|
createServiceCart(serviceCart: CreateServiceCartRequest): Promise<ErrorResponse | ServiceCart>;
|
101
101
|
/**
|
102
102
|
* @description This method shall be called when the user wants to retrieve information about the buyer and the passengers.
|
@@ -239,14 +239,14 @@ var ServiceBooking = /** @class */ (function (_super) {
|
|
239
239
|
* and/or a specific hour for the tour.
|
240
240
|
* You should call this method only if {@link Service.isDateOptional} or {@link Service.isDateRequired} is true for the selected tour.
|
241
241
|
* @param {number} serviceId The id of the selected tour (can be retrieved in the object {@link Service} returned by {@link getTours})
|
242
|
-
* @param {
|
242
|
+
* @param {string} date The date on which to get the tours, in ISO string format
|
243
243
|
* @returns {ServiceTrip[]} The returned information about the tour (tripId and hour)
|
244
244
|
*/
|
245
245
|
ServiceBooking.prototype.getServiceTrips = function (serviceId, date) {
|
246
246
|
return __awaiter(this, void 0, void 0, function () {
|
247
247
|
var searchParams, url;
|
248
248
|
return __generator(this, function (_a) {
|
249
|
-
searchParams = new URLSearchParams({ date: date
|
249
|
+
searchParams = new URLSearchParams({ date: date });
|
250
250
|
url = "".concat(this.config.API_ENDPOINT, "/v3_booking/services/").concat(serviceId, "/trips?").concat(searchParams);
|
251
251
|
return [2 /*return*/, this.callGetApi(url).then(function (response) {
|
252
252
|
return (0, ErrorResponse_1.objectIsMTSErrorResponse)(response) ? response : response.trips;
|