mts-booking-library 2.4.11 → 2.4.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.
@@ -93,7 +93,7 @@ export declare class JourneyBooking extends Booking {
|
|
93
93
|
* This method creates a journey cart (MLP) for the given parameters.
|
94
94
|
* @returns The created cart
|
95
95
|
*/
|
96
|
-
createCart(
|
96
|
+
createCart(cartRequest: CreateUpdateCartRequest, options?: ApiCallOptions): Promise<ErrorResponse | JourneyCart>;
|
97
97
|
/** @deprecated Use {@link createCart} instead. */
|
98
98
|
createJourneyCart(journeyCart: CreateJourneyCartRequest, options?: ApiCallOptions): Promise<ErrorResponse | JourneyCart>;
|
99
99
|
/**
|
@@ -266,12 +266,13 @@ var JourneyBooking = /** @class */ (function (_super) {
|
|
266
266
|
* This method creates a journey cart (MLP) for the given parameters.
|
267
267
|
* @returns The created cart
|
268
268
|
*/
|
269
|
-
JourneyBooking.prototype.createCart = function (
|
269
|
+
JourneyBooking.prototype.createCart = function (cartRequest, options) {
|
270
270
|
return __awaiter(this, void 0, void 0, function () {
|
271
|
-
var url;
|
271
|
+
var url, request;
|
272
272
|
var _this = this;
|
273
273
|
return __generator(this, function (_a) {
|
274
274
|
url = "".concat(this.config.API_ENDPOINT, "/v3_booking/carts");
|
275
|
+
request = __assign(__assign({}, cartRequest), (this.cartGuid && { cartGuid: this.cartGuid }));
|
275
276
|
return [2 /*return*/, this.callPostApi(url, request, options).then(function (response) { return __awaiter(_this, void 0, void 0, function () {
|
276
277
|
return __generator(this, function (_a) {
|
277
278
|
switch (_a.label) {
|
@@ -32,8 +32,16 @@ export type CartBooking = {
|
|
32
32
|
tripId?: number;
|
33
33
|
/** The id of the line, if necessary. For example, this is used by Services */
|
34
34
|
lineId?: number;
|
35
|
-
/**
|
35
|
+
/**
|
36
|
+
* The start date of the booking, if necessary. For example, this is used by TPL subscriptions.
|
37
|
+
* @deprecated Use {@link CartBooking.dateTimeLocalLong} instead.
|
38
|
+
*/
|
36
39
|
startDate?: string;
|
40
|
+
/**
|
41
|
+
* The start date of the booking, if necessary. For example, this is used by TPL subscriptions.
|
42
|
+
* @format "YYYYMMDDHHMMSSMMM", the time refers to the local time zone of the seller.
|
43
|
+
*/
|
44
|
+
dateTimeLocalLong?: number;
|
37
45
|
/** If true, then the booking will be the current period (e.g. this month or this year), otherwise it will be the next period. */
|
38
46
|
isCurrentPeriod?: boolean;
|
39
47
|
/** The PNR of the ticket of reference, if necessary. For example, this is used in TPL when renewing a subscription. */
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "mts-booking-library",
|
3
|
-
"version": "2.4.
|
3
|
+
"version": "2.4.13",
|
4
4
|
"description": "Library for using MyTicketSolution Booking API",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"types": "lib/index.d.ts",
|
@@ -42,8 +42,8 @@
|
|
42
42
|
],
|
43
43
|
"author": "Infoservice s.r.l.",
|
44
44
|
"dependencies": {
|
45
|
-
"@react-native-async-storage/async-storage": "^2.
|
46
|
-
"axios": "^1.
|
47
|
-
"zustand": "^5.0.
|
45
|
+
"@react-native-async-storage/async-storage": "^2.2.0",
|
46
|
+
"axios": "^1.11.0",
|
47
|
+
"zustand": "^5.0.6"
|
48
48
|
}
|
49
49
|
}
|