mts-booking-library 1.3.20 → 1.3.22

Sign up to get free protection for your applications and to get access to all the features.
@@ -258,7 +258,14 @@ var JourneyBooking = /** @class */ (function (_super) {
258
258
  if (request.departureStopName === undefined || request.destinationStopName === undefined) {
259
259
  throw Error("Fields departureStopName and destinationStopName are required");
260
260
  }
261
- searchParams = new URLSearchParams(__assign({ departureStopName: request.departureStopName, destinationStopName: request.destinationStopName, passengersNumber: request.passengersNumber.toString(), date: request.date, roundTripDate: request.roundTripDate ? request.roundTripDate : "null", currency: request.currency }, (this.cartId && { cartId: this.cartId.toString() })));
261
+ searchParams = new URLSearchParams({
262
+ departureStopName: request.departureStopName,
263
+ destinationStopName: request.destinationStopName,
264
+ passengersNumber: request.passengersNumber.toString(),
265
+ date: request.date,
266
+ roundTripDate: request.roundTripDate ? request.roundTripDate : "null",
267
+ currency: request.currency
268
+ });
262
269
  url = "".concat(this.config.API_ENDPOINT, "/v3_booking/journeys?").concat(searchParams);
263
270
  return [2 /*return*/, this.callGetApi(url).then(function (response) {
264
271
  return (0, ErrorResponse_1.objectIsMTSErrorResponse)(response)
@@ -274,7 +281,7 @@ var JourneyBooking = /** @class */ (function (_super) {
274
281
  var _this = this;
275
282
  return __generator(this, function (_a) {
276
283
  url = "".concat(this.config.API_ENDPOINT, "/v3_booking/journeys/carts");
277
- request = __assign(__assign({}, journeyCart), (this.cartId && { cartId: this.cartId.toString() }));
284
+ request = __assign(__assign({}, journeyCart), (this.cartGuid && { cartGuid: this.cartGuid }));
278
285
  return [2 /*return*/, this.callPostApi(url, request).then(function (response) {
279
286
  // Check for errors
280
287
  if ((0, ErrorResponse_1.objectIsMTSErrorResponse)(response)) {
@@ -29,6 +29,8 @@ export type Cart = {
29
29
  sellerPrivacyUrl: string;
30
30
  /** The url redirecting to the terms and conditions of the seller */
31
31
  sellerTermsUrl: string;
32
+ /** The support email of the seller, if any */
33
+ sellerEmailLinkavel: string | null;
32
34
  /** The code of the cart */
33
35
  cartCode: string;
34
36
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mts-booking-library",
3
- "version": "1.3.20",
3
+ "version": "1.3.22",
4
4
  "description": "Library for using MyTicketSolution Booking API",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",